diff --git a/NEWS.md b/NEWS.md index 4ae894a0..d6f8b1c7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,8 @@ Red Panda C++ Version 2.21 - change: The option "Check for stack smashing attacks (-fstack-protector)" is turned off by default in the Debug compiler set settings. - fix: Project makefile generated for C files is not correct. - - fix: Horizontal scroll with touchpad is not working. + - fix: Horizontal scroll by touchpad is not working. + - fix: Horizontal scroll by touchpad is inversed. Red Panda C++ Version 2.20 diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index 2e5fb09a..bde4a5b6 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -6307,11 +6307,11 @@ void QSynEdit::wheelEvent(QWheelEvent *event) mWheelAccumulatedDeltaX+=event->angleDelta().y(); while (mWheelAccumulatedDeltaX>=120) { mWheelAccumulatedDeltaX-=120; - horizontalScrollBar()->setValue(horizontalScrollBar()->value()-mMouseWheelScrollSpeed); + horizontalScrollBar()->setValue(horizontalScrollBar()->value()+mMouseWheelScrollSpeed); } while (mWheelAccumulatedDeltaX<=-120) { mWheelAccumulatedDeltaX+=120; - horizontalScrollBar()->setValue(horizontalScrollBar()->value()+mMouseWheelScrollSpeed); + horizontalScrollBar()->setValue(horizontalScrollBar()->value()-mMouseWheelScrollSpeed); } } else { if ( (mWheelAccumulatedDeltaY>0 &&event->angleDelta().y()<0) @@ -6333,11 +6333,11 @@ void QSynEdit::wheelEvent(QWheelEvent *event) mWheelAccumulatedDeltaX+=event->angleDelta().x(); while (mWheelAccumulatedDeltaX>=120) { mWheelAccumulatedDeltaX-=120; - horizontalScrollBar()->setValue(horizontalScrollBar()->value()-mMouseWheelScrollSpeed); + horizontalScrollBar()->setValue(horizontalScrollBar()->value()+mMouseWheelScrollSpeed); } while (mWheelAccumulatedDeltaX<=-120) { mWheelAccumulatedDeltaX+=120; - horizontalScrollBar()->setValue(horizontalScrollBar()->value()+mMouseWheelScrollSpeed); + horizontalScrollBar()->setValue(horizontalScrollBar()->value()-mMouseWheelScrollSpeed); } } event->accept();