From 0c6d19e8568781a9fc88140337185d6090ff7551 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 31 Jul 2020 12:44:44 +0200 Subject: [PATCH] return to bounds after flicking --- .../taskpanel/package/contents/ui/TaskSwitcher.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/containments/taskpanel/package/contents/ui/TaskSwitcher.qml b/containments/taskpanel/package/contents/ui/TaskSwitcher.qml index 60a89c65..893fea15 100644 --- a/containments/taskpanel/package/contents/ui/TaskSwitcher.qml +++ b/containments/taskpanel/package/contents/ui/TaskSwitcher.qml @@ -189,6 +189,8 @@ NanoShell.FullScreenOverlay { height: window.height contentWidth: width contentHeight: mainArea.implicitHeight + // topMargin: flickingVertically ? -height : 0 + // bottomMargin: flickingVertically ? -height : 0 property int flickState: TaskSwitcher.MovementDirection.None readonly property int movementDirection: { @@ -207,10 +209,12 @@ NanoShell.FullScreenOverlay { if (flickingVertically) { flickState = verticalVelocity < 0 ? TaskSwitcher.MovementDirection.Up : TaskSwitcher.MovementDirection.Down; } else if (/*!draggingVertically &&*/ !flickingVertically) { - draggingVerticallyChanged(); flickState = TaskSwitcher.MovementDirection.None } - + Qt.callLater(function() { + tasksView.topMargin = flickingVertically && !scrollAnim.running ? -tasksView.height : 0; + tasksView.bottomMargin = tasksView.topMargin; + }); } onDraggingVerticallyChanged: {