mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Use QWheelEvent::inverted() in swipe gesture.
This commit is contained in:
parent
5024f1db8c
commit
16825fff41
2 changed files with 3 additions and 2 deletions
|
@ -229,10 +229,11 @@ void SetupSwipeHandler(
|
||||||
if (cancel) {
|
if (cancel) {
|
||||||
processEnd();
|
processEnd();
|
||||||
} else {
|
} else {
|
||||||
|
const auto invert = (w->inverted() ? 1 : 0);
|
||||||
updateWith({
|
updateWith({
|
||||||
.globalCursor = w->globalPosition().toPoint(),
|
.globalCursor = w->globalPosition().toPoint(),
|
||||||
.position = QPointF(),
|
.position = QPointF(),
|
||||||
.delta = state->delta - Ui::ScrollDelta(w),
|
.delta = state->delta + Ui::ScrollDelta(w) * invert,
|
||||||
.touch = false,
|
.touch = false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9d2c1836ebdf48f37d1f461b19e2d4cbb60b1c2f
|
Subproject commit 9965046aac159fab07bbe99d27692d76d1b86312
|
Loading…
Add table
Reference in a new issue