From c0ef6c674736c630ca36fe35daed61d2bf372036 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 13 Jul 2015 15:50:22 +0200 Subject: [PATCH] try to interact only with the applet in the top area has to be tested, maybe is even worse, but in order to not interfere with the vertical scrollbar of things like networkmanager needs a real solution --- containments/panel/contents/ui/SlidingPanel.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/containments/panel/contents/ui/SlidingPanel.qml b/containments/panel/contents/ui/SlidingPanel.qml index d1a62eb0..a524a77f 100644 --- a/containments/panel/contents/ui/SlidingPanel.qml +++ b/containments/panel/contents/ui/SlidingPanel.qml @@ -62,9 +62,14 @@ FullScreenPanel { property int oldMouseY: 0 property int startOffset: units.iconSizes.large; + property int startMouseY: 0 property string startState: "closed" onPressed: { + startMouseY = mouse.y; + if (startMouseY < contentArea.height - units.iconSizes.large) { + return; + } startState = state; startOffset = window.offset; oldMouseY = mouse.y; @@ -72,12 +77,18 @@ FullScreenPanel { window.offset = startOffset; } onPositionChanged: { + if (startMouseY < contentArea.height - units.iconSizes.large) { + return; + } var factor = (mouse.y - oldMouseY > 0) ? (1 - Math.max(0, (slidingArea.y + overShoot) / overShoot)) : 1 window.offset = window.offset + (mouse.y - oldMouseY) * factor; oldMouseY = mouse.y; } onReleased: { + if (startMouseY < contentArea.height - units.iconSizes.large) { + return; + } if (Math.abs(window.offset - mouseArea.startOffset) < units.gridUnit && slidingArea.y + slidingArea.height < mouse.y) { mouseArea.state = "closed"; @@ -137,6 +148,9 @@ FullScreenPanel { z: -1 anchors.fill: parent onClicked: { + if (startMouseY < contentArea.height - units.iconSizes.large) { + return; + } mouseArea.state = "closed"; //window.visible = false; }