Commit de5d7a84 authored by Janet Blackquill's avatar Janet Blackquill 🌈 Committed by Nate Graham
Browse files

effects/desktopgrid: register down gesture

Now you can close the desktop grid with the inverse
of the gesture you used to open it.

BUG: 444694
FIXED-IN: 5.24.4


(cherry picked from commit 5ffc307c)
parent da28a57a
Pipeline #147037 failed with stage
in 11 minutes and 28 seconds
......@@ -93,6 +93,13 @@ DesktopGridEffect::DesktopGridEffect()
timeline.setCurrentTime(timeline.duration() * cb);
effects->addRepaintFull();
});
effects->registerRealtimeTouchpadSwipeShortcut(SwipeDirection::Down, a, [this](qreal cb) {
if (!activated) return;
timeline.setDirection(QTimeLine::Backward);
timeline.setCurrentTime(timeline.duration() - (timeline.duration() * cb));
effects->addRepaintFull();
});
connect(&timeline, &QTimeLine::frameChanged, this, []() {
effects->addRepaintFull();
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment