mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Use angleDelta instead of delta
This commit is contained in:
parent
d47bd55fa0
commit
dc8c6e23e9
@ -23,10 +23,10 @@ ScrollManagement::Movement ScrollManagement::getMovement(QWheelEvent *event)
|
||||
}
|
||||
|
||||
// Accumulate the delta
|
||||
if ((event->delta() < 0) != (wheelAccumulator < 0)) // different sign means change in direction
|
||||
if ((event->angleDelta().y() < 0) != (wheelAccumulator < 0)) // different sign means change in direction
|
||||
wheelAccumulator = 0;
|
||||
|
||||
wheelAccumulator += event->delta();
|
||||
wheelAccumulator += event->angleDelta().y();
|
||||
|
||||
// Do not process events too fast
|
||||
if ((wheelTimer->elapsed() < timeThrottle)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user