Commit ead97b23 authored by Marco Martin's avatar Marco Martin
Browse files

fix bottom gesture

parent d4e44310
...@@ -83,7 +83,7 @@ NanoShell.FullScreenOverlay { ...@@ -83,7 +83,7 @@ NanoShell.FullScreenOverlay {
} }
} }
onOffsetChanged: tasksView.contentY = offset onOffsetChanged: tasksView.contentY = offset + grid.y
onVisibleChanged: { onVisibleChanged: {
if (!visible) { if (!visible) {
tasksView.contentY = 0; tasksView.contentY = 0;
......
...@@ -81,6 +81,7 @@ PlasmaCore.ColorScope { ...@@ -81,6 +81,7 @@ PlasmaCore.ColorScope {
property int oldMouseY: 0 property int oldMouseY: 0
property int startMouseY: 0 property int startMouseY: 0
property bool isDragging: false property bool isDragging: false
property bool opening: false
drag.filterChildren: true drag.filterChildren: true
function managePressed(mouse) { function managePressed(mouse) {
startMouseY = oldMouseY = mouse.y; startMouseY = oldMouseY = mouse.y;
...@@ -96,6 +97,7 @@ PlasmaCore.ColorScope { ...@@ -96,6 +97,7 @@ PlasmaCore.ColorScope {
} }
taskSwitcher.offset = taskSwitcher.offset - (mouse.y - oldMouseY); taskSwitcher.offset = taskSwitcher.offset - (mouse.y - oldMouseY);
opening = oldMouseY > mouse.y;
oldMouseY = mouse.y; oldMouseY = mouse.y;
if (taskSwitcher.visibility == Window.Hidden && taskSwitcher.offset > -taskSwitcher.height + units.gridUnit && taskSwitcher.tasksCount) { if (taskSwitcher.visibility == Window.Hidden && taskSwitcher.offset > -taskSwitcher.height + units.gridUnit && taskSwitcher.tasksCount) {
taskSwitcher.showFullScreen(); taskSwitcher.showFullScreen();
...@@ -109,12 +111,10 @@ PlasmaCore.ColorScope { ...@@ -109,12 +111,10 @@ PlasmaCore.ColorScope {
if (taskSwitcher.visibility == Window.Hidden) { if (taskSwitcher.visibility == Window.Hidden) {
return; return;
} }
if (taskSwitcher.offset > -taskSwitcher.height/2) { if (opening) {
taskSwitcher.currentTaskIndex = -1
taskSwitcher.show(); taskSwitcher.show();
} else { } else {
taskSwitcher.hide(); taskSwitcher.hide();
taskSwitcher.setSingleActiveWindow(taskSwitcher.currentTaskIndex);
} }
} }
......
Markdown is supported
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