reparent the panel when dragging

this creates the impression that the user is dragging the top panel
even if there is no window moving
This commit is contained in:
Marco Martin 2015-03-13 17:25:57 +01:00
parent 432deeff64
commit b6122d7e7a
2 changed files with 22 additions and 11 deletions

View file

@ -204,7 +204,13 @@ Item {
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
Rectangle { Rectangle {
anchors.fill: parent parent: slidingPanel.visible ? panelContents : statusPanel
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
height: units.iconSizes.small
color: PlasmaCore.ColorScope.backgroundColor color: PlasmaCore.ColorScope.backgroundColor
PlasmaCore.IconItem { PlasmaCore.IconItem {
@ -263,6 +269,15 @@ Item {
} }
} }
} }
Rectangle {
height: units.smallSpacing/2
color: PlasmaCore.ColorScope.highlightColor
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
}
} }
MouseArea { MouseArea {
property int oldMouseY: 0 property int oldMouseY: 0
@ -288,6 +303,10 @@ Item {
id: slidingPanel id: slidingPanel
width: homescreen.width width: homescreen.width
height: homescreen.height height: homescreen.height
contents: Item {
id: panelContents
anchors.fill: parent
}
} }
Component.onCompleted: { Component.onCompleted: {

View file

@ -52,7 +52,7 @@ Window {
MouseArea { MouseArea {
id: mouseArea id: mouseArea
y: units.iconSizes.small y: 0
width: window.width width: window.width
height: window.height - y height: window.height - y
clip: true clip: true
@ -105,15 +105,7 @@ Window {
} }
} }
color: PlasmaCore.ColorScope.backgroundColor color: PlasmaCore.ColorScope.backgroundColor
Rectangle {
height: units.smallSpacing/2
color: PlasmaCore.ColorScope.highlightColor
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
}
Rectangle { Rectangle {
height: units.gridUnit height: units.gridUnit
anchors { anchors {