Use QWheelEvent::inverted() in swipe gesture.

This commit is contained in:
John Preston 2024-09-05 11:30:37 +04:00
parent 5024f1db8c
commit 16825fff41
2 changed files with 3 additions and 2 deletions

View file

@ -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,
});
}

@ -1 +1 @@
Subproject commit 9d2c1836ebdf48f37d1f461b19e2d4cbb60b1c2f
Subproject commit 9965046aac159fab07bbe99d27692d76d1b86312