- fix: Horizontal scroll with touchpad is not working.
This commit is contained in:
parent
2532a1dcdb
commit
98989f34c1
1
NEWS.md
1
NEWS.md
|
@ -2,6 +2,7 @@ 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.
|
||||
|
||||
Red Panda C++ Version 2.20
|
||||
|
||||
|
|
|
@ -6326,6 +6326,19 @@ void QSynEdit::wheelEvent(QWheelEvent *event)
|
|||
mWheelAccumulatedDeltaY+=120;
|
||||
verticalScrollBar()->setValue(verticalScrollBar()->value()+mMouseWheelScrollSpeed);
|
||||
}
|
||||
|
||||
if ( (mWheelAccumulatedDeltaX>0 &&event->angleDelta().x()<0)
|
||||
|| (mWheelAccumulatedDeltaX<0 &&event->angleDelta().x()>0))
|
||||
mWheelAccumulatedDeltaX=0;
|
||||
mWheelAccumulatedDeltaX+=event->angleDelta().x();
|
||||
while (mWheelAccumulatedDeltaX>=120) {
|
||||
mWheelAccumulatedDeltaX-=120;
|
||||
horizontalScrollBar()->setValue(horizontalScrollBar()->value()-mMouseWheelScrollSpeed);
|
||||
}
|
||||
while (mWheelAccumulatedDeltaX<=-120) {
|
||||
mWheelAccumulatedDeltaX+=120;
|
||||
horizontalScrollBar()->setValue(horizontalScrollBar()->value()+mMouseWheelScrollSpeed);
|
||||
}
|
||||
}
|
||||
event->accept();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue