From 16825fff41fe51211245629c77d6779ee8de3f6b Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 5 Sep 2024 11:30:37 +0400 Subject: [PATCH] Use QWheelEvent::inverted() in swipe gesture. --- Telegram/SourceFiles/history/history_view_swipe.cpp | 3 ++- Telegram/lib_ui | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_view_swipe.cpp b/Telegram/SourceFiles/history/history_view_swipe.cpp index b7a95517c..794592239 100644 --- a/Telegram/SourceFiles/history/history_view_swipe.cpp +++ b/Telegram/SourceFiles/history/history_view_swipe.cpp @@ -229,10 +229,11 @@ void SetupSwipeHandler( if (cancel) { processEnd(); } else { + const auto invert = (w->inverted() ? 1 : 0); updateWith({ .globalCursor = w->globalPosition().toPoint(), .position = QPointF(), - .delta = state->delta - Ui::ScrollDelta(w), + .delta = state->delta + Ui::ScrollDelta(w) * invert, .touch = false, }); } diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 9d2c1836e..9965046aa 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 9d2c1836ebdf48f37d1f461b19e2d4cbb60b1c2f +Subproject commit 9965046aac159fab07bbe99d27692d76d1b86312