From ec8cf59ddb0f746c801844d5e4413bba6e91694b Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 5 Sep 2017 15:53:42 +0200 Subject: [PATCH] don't let the top panel scroll out of sight --- containments/panel/contents/ui/SlidingPanel.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/containments/panel/contents/ui/SlidingPanel.qml b/containments/panel/contents/ui/SlidingPanel.qml index 1bfb21b4..592ebcce 100644 --- a/containments/panel/contents/ui/SlidingPanel.qml +++ b/containments/panel/contents/ui/SlidingPanel.qml @@ -137,7 +137,12 @@ FullScreenPanel { when: !mainFlickable.moving && !mainFlickable.dragging && !mainFlickable.flicking } //no loop as those 2 values compute to exactly the same - onContentYChanged: window.offset = -contentY + contentArea.height - window.headerHeight + onContentYChanged: { + window.offset = -contentY + contentArea.height - window.headerHeight + if (contentY > contentArea.height - headerHeight) { + contentY = contentArea.height - headerHeight; + } + } contentWidth: window.width contentHeight: window.height*2 bottomMargin: window.height @@ -168,7 +173,7 @@ FullScreenPanel { } } Rectangle { - height: units.gridUnit + height: units.smallSpacing anchors { left: parent.left right: parent.right