- fix: Horizontal scroll by touchpad is inversed.

This commit is contained in:
Roy Qu 2023-04-13 21:50:53 +08:00
parent 98989f34c1
commit ba218fb8b8
2 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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();