mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +02:00
Switched swipe-to-reply processing on macOS from touch to scroll events.
This commit is contained in:
parent
dab107cf90
commit
f16d1f034f
1 changed files with 4 additions and 2 deletions
|
@ -191,7 +191,7 @@ void SetupSwipeHandler(
|
|||
const auto t = static_cast<QTouchEvent*>(e.get());
|
||||
const auto touchscreen = t->device()
|
||||
&& (t->device()->type() == base::TouchDevice::TouchScreen);
|
||||
if (!Platform::IsMac() && !touchscreen) {
|
||||
if (/*!Platform::IsMac() && */!touchscreen) {
|
||||
break;
|
||||
} else if (type == QEvent::TouchBegin) {
|
||||
// Reset state in case we lost some TouchEnd.
|
||||
|
@ -235,6 +235,7 @@ void SetupSwipeHandler(
|
|||
case QEvent::Wheel: {
|
||||
const auto w = static_cast<QWheelEvent*>(e.get());
|
||||
const auto phase = w->phase();
|
||||
#if 0
|
||||
#ifdef Q_OS_MAC
|
||||
if (phase == Qt::ScrollBegin) {
|
||||
state->twoFingerScrollStarted = true;
|
||||
|
@ -246,7 +247,8 @@ void SetupSwipeHandler(
|
|||
state->twoFingerScrollStarted = false;
|
||||
}
|
||||
#endif // Q_OS_MAC
|
||||
if (Platform::IsMac() || phase == Qt::NoScrollPhase) {
|
||||
#endif
|
||||
if (/*Platform::IsMac() || */phase == Qt::NoScrollPhase) {
|
||||
break;
|
||||
} else if (phase == Qt::ScrollBegin) {
|
||||
// Reset state in case we lost some TouchEnd.
|
||||
|
|
Loading…
Add table
Reference in a new issue