mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-26 14:24:45 +00:00
homescreen: Fix swipe down gesture conflict with taskpanel
This commit is contained in:
parent
54f10f9f13
commit
7a1a32724b
1 changed files with 15 additions and 11 deletions
|
|
@ -52,19 +52,23 @@ DragHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__scrollDirection !== DragGestureHandler.Left && __scrollDirection !== DragGestureHandler.Right) {
|
if (__scrollDirection !== DragGestureHandler.Left && __scrollDirection !== DragGestureHandler.Right) {
|
||||||
// if swipe up, scroll app drawer
|
|
||||||
root.appDrawer.flickable.contentY = Math.min(root.appDrawer.drawerTopMargin, Math.max(0, -translation.y));
|
|
||||||
|
|
||||||
if (translation.y < 0 && MobileShell.TopPanelControls.inSwipe) {
|
// ensure it does not conflict with task switcher
|
||||||
MobileShell.TopPanelControls.endSwipe();
|
if (!MobileShell.HomeScreenControls.taskSwitcher.visible) {
|
||||||
}
|
// if swipe up, scroll app drawer
|
||||||
|
root.appDrawer.flickable.contentY = Math.min(root.appDrawer.drawerTopMargin, Math.max(0, -translation.y));
|
||||||
|
|
||||||
// if swipe down, scroll top panel
|
if (translation.y < 0 && MobileShell.TopPanelControls.inSwipe) {
|
||||||
if (translation.y > 0) {
|
MobileShell.TopPanelControls.endSwipe();
|
||||||
if (!MobileShell.TopPanelControls.inSwipe) {
|
}
|
||||||
MobileShell.TopPanelControls.startSwipe();
|
|
||||||
|
// if swipe down, scroll top panel
|
||||||
|
if (translation.y > 0) {
|
||||||
|
if (!MobileShell.TopPanelControls.inSwipe) {
|
||||||
|
MobileShell.TopPanelControls.startSwipe();
|
||||||
|
}
|
||||||
|
MobileShell.TopPanelControls.requestRelativeScroll(translation.y - __oldTranslationY);
|
||||||
}
|
}
|
||||||
MobileShell.TopPanelControls.requestRelativeScroll(translation.y - __oldTranslationY);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue