diff --git a/containments/panel/contents/ui/SlidingPanel.qml b/containments/panel/contents/ui/SlidingPanel.qml index 97a5406e..ab4db66d 100644 --- a/containments/panel/contents/ui/SlidingPanel.qml +++ b/containments/panel/contents/ui/SlidingPanel.qml @@ -32,6 +32,7 @@ FullScreenPanel { color: "transparent" property alias contents: contentArea.data + property int headerHeight width: Screen.width height: Screen.height @@ -53,7 +54,11 @@ FullScreenPanel { openAnim.running = true; } } - + Timer { + id: updateStateTimer + interval: 0 + onTriggered: updateState() + } onActiveChanged: { if (!active) { close(); @@ -89,7 +94,7 @@ FullScreenPanel { easing.type: Easing.InOutQuad properties: "offset" from: window.offset - to: window.peekHeight + to: window.peekHeight - headerHeight } PropertyAnimation { id: openAnim @@ -127,11 +132,11 @@ FullScreenPanel { Binding { target: mainFlickable property: "contentY" - value: -window.offset + contentArea.height + value: -window.offset + contentArea.height - window.headerHeight when: !mainFlickable.moving && !mainFlickable.dragging && !mainFlickable.flicking } //no loop as those 2 values compute to exactly the same - onContentYChanged: window.offset = -contentY + contentArea.height + onContentYChanged: window.offset = -contentY + contentArea.height - window.headerHeight contentWidth: window.width contentHeight: window.height*2 bottomMargin: window.height @@ -139,7 +144,7 @@ FullScreenPanel { onFlickEnded: window.updateState(); Item { width: window.width - height: window.height*2 + height: Math.max(contentArea.height, window.height*2) Item { id: contentArea anchors { @@ -147,6 +152,9 @@ FullScreenPanel { right: parent.right } height: children[0].implicitHeight + onHeightChanged: { + updateStateTimer.restart() + } } Rectangle { height: units.gridUnit diff --git a/containments/panel/contents/ui/main.qml b/containments/panel/contents/ui/main.qml index fede9930..97079350 100644 --- a/containments/panel/contents/ui/main.qml +++ b/containments/panel/contents/ui/main.qml @@ -201,6 +201,7 @@ PlasmaCore.ColorScope { width: plasmoid.availableScreenRect.width height: plasmoid.availableScreenRect.height peekHeight: quickSettingsParent.height + notificationsParent.minimumHeight + root.height + headerHeight: root.height contents: Item { id: panelContents anchors.fill: parent @@ -226,7 +227,7 @@ PlasmaCore.ColorScope { height: units.devicePixelRatio color: PlasmaCore.ColorScope.textColor opacity: 0.2 - visible: slidingPanel.offset < panelContents.height + visible: slidingPanel.offset + slidingPanel.headerHeight < panelContents.height } } Item { @@ -240,7 +241,6 @@ PlasmaCore.ColorScope { property var applet height: applet ? applet.fullRepresentationItem.Layout.maximumHeight : 0 property int minimumHeight: applet ? applet.fullRepresentationItem.Layout.minimumHeight : 0 - onHeightChanged: slidingPanel.updateState(); } } }