on xenial help sign in
Stage fixes for panelState
commitb5e6fbfca113a8d1f0899fee25e911a7875bfcaf authorNick Dedekind <nick.dedekind@canonical.com> dateTue 28 Mar 2017, 18:21 (10 years ago) parent87d6679
3 files changed+5−5
qml/Stage/DecoratedWindow.qml+1 qml/Stage/WindowDecoration.qml+2 tests/qmltests/Stage/tst_DesktopStage.qml+2−5
qml/Stage/DecoratedWindow.qml+1
@@ -212,6 +212,7 @@ FocusScope {
212212
213213 title: applicationWindow.title
214214 windowMoving: moveHandler.moving && !altDragHandler.dragging
215+ panelState: root.panelState
215216
216217 opacity: root.hasDecoration ? Math.min(1, root.showDecoration) : 0
217218 Behavior on opacity { UbuntuNumberAnimation { } }
qml/Stage/WindowDecoration.qml+2
@@ -34,6 +34,7 @@ MouseArea {
3434 property var menu: undefined
3535 property bool enableMenus: true
3636 property bool windowMoving: false
37+ property PanelState panelState
3738
3839 readonly property real buttonsWidth: buttons.width + row.spacing
3940
@@ -146,6 +147,7 @@ MouseArea {
146147 enableKeyFilter: valid && root.active && root.enableMenus
147148 unityMenuModel: root.menu
148149 windowMoving: root.windowMoving
150+ panelState: root.panelState
149151
150152 onPressed: root.onPressed(mouse)
151153 onPressedChangedEx: root.pressedChangedEx(pressed, pressedButtons, mouseX, mouseY)
tests/qmltests/Stage/tst_DesktopStage.qml+2−5
@@ -44,10 +44,6 @@ Item {
4444 value: false
4545 }
4646
47− PanelState {
48− id: panelState
49− }
50−
5147 Component.onCompleted: {
5248 ApplicationMenusLimits.screenWidth = Qt.binding( function() { return stageLoader.width; } );
5349 ApplicationMenusLimits.screenHeight = Qt.binding( function() { return stageLoader.height; } );
@@ -106,7 +102,7 @@ Item {
106102 topLevelSurfaceList: topSurfaceList
107103 interactive: true
108104 mode: "windowed"
109− panelState: panelState
105+ panelState: PanelState {}
110106 }
111107 }
112108 }
@@ -178,6 +174,7 @@ Item {
178174
179175 stage: stageLoader.status === Loader.Ready ? stageLoader.item : null
180176 topLevelSurfaceList: topSurfaceList
177+ property var panelState: stage ? stage.panelState : null
181178
182179 function init() {
183180 // wait until unity8-dash is up and running.