mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 18:24:46 +00:00
return to bounds after flicking
This commit is contained in:
parent
ae67112a5c
commit
0c6d19e856
1 changed files with 6 additions and 2 deletions
|
|
@ -189,6 +189,8 @@ NanoShell.FullScreenOverlay {
|
||||||
height: window.height
|
height: window.height
|
||||||
contentWidth: width
|
contentWidth: width
|
||||||
contentHeight: mainArea.implicitHeight
|
contentHeight: mainArea.implicitHeight
|
||||||
|
// topMargin: flickingVertically ? -height : 0
|
||||||
|
// bottomMargin: flickingVertically ? -height : 0
|
||||||
property int flickState: TaskSwitcher.MovementDirection.None
|
property int flickState: TaskSwitcher.MovementDirection.None
|
||||||
|
|
||||||
readonly property int movementDirection: {
|
readonly property int movementDirection: {
|
||||||
|
|
@ -207,10 +209,12 @@ NanoShell.FullScreenOverlay {
|
||||||
if (flickingVertically) {
|
if (flickingVertically) {
|
||||||
flickState = verticalVelocity < 0 ? TaskSwitcher.MovementDirection.Up : TaskSwitcher.MovementDirection.Down;
|
flickState = verticalVelocity < 0 ? TaskSwitcher.MovementDirection.Up : TaskSwitcher.MovementDirection.Down;
|
||||||
} else if (/*!draggingVertically &&*/ !flickingVertically) {
|
} else if (/*!draggingVertically &&*/ !flickingVertically) {
|
||||||
draggingVerticallyChanged();
|
|
||||||
flickState = TaskSwitcher.MovementDirection.None
|
flickState = TaskSwitcher.MovementDirection.None
|
||||||
}
|
}
|
||||||
|
Qt.callLater(function() {
|
||||||
|
tasksView.topMargin = flickingVertically && !scrollAnim.running ? -tasksView.height : 0;
|
||||||
|
tasksView.bottomMargin = tasksView.topMargin;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDraggingVerticallyChanged: {
|
onDraggingVerticallyChanged: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue