mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Fix scrolling with a touchpad in vertical drum.
This commit is contained in:
parent
9478798a47
commit
7b7016c4b3
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue