mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix scrolling with a touchpad in vertical drum.
This commit is contained in:
@@ -106,8 +106,10 @@ void VerticalDrumPicker::handleWheelEvent(not_null<QWheelEvent*> e) {
|
||||
if (direction) {
|
||||
_animation.jumpToOffset(direction);
|
||||
} else {
|
||||
increaseShift(
|
||||
std::min(e->pixelDelta().y() / float64(_itemHeight), 0.99));
|
||||
const auto delta = e->pixelDelta().y()
|
||||
? e->pixelDelta().y()
|
||||
: e->angleDelta().y();
|
||||
increaseShift(std::min(delta / float64(_itemHeight), 0.99));
|
||||
if (e->phase() == Qt::ScrollEnd) {
|
||||
animationDataFromIndex();
|
||||
_animation.jumpToOffset(0);
|
||||
|
||||
Reference in New Issue
Block a user