Skip to content

Commit

Permalink
Use QWheelEvent::inverted() in swipe gesture.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Sep 5, 2024
1 parent 5024f1d commit 16825ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Telegram/SourceFiles/history/history_view_swipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
}
Expand Down
2 changes: 1 addition & 1 deletion Telegram/lib_ui

0 comments on commit 16825ff

Please sign in to comment.