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
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
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 {
property int oldMouseY: 0
@ -288,6 +303,10 @@ Item {
id: slidingPanel
width: homescreen.width
height: homescreen.height
contents: Item {
id: panelContents
anchors.fill: parent
}
}
Component.onCompleted: {

View file

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