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
This commit is contained in:
parent
1b7173e927
commit
5ffc307ca8
1 changed files with 7 additions and 0 deletions
|
@ -93,6 +93,13 @@ DesktopGridEffect::DesktopGridEffect()
|
||||||
timeline.setCurrentTime(timeline.duration() * cb);
|
timeline.setCurrentTime(timeline.duration() * cb);
|
||||||
effects->addRepaintFull();
|
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, []() {
|
connect(&timeline, &QTimeLine::frameChanged, this, []() {
|
||||||
effects->addRepaintFull();
|
effects->addRepaintFull();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue