on xenial help sign in
Stage fixes for panelState
b5e6fbfNick Dedekind
qml/Stage/DecoratedWindow.qml+1
@@ -212,6 +212,7 @@ FocusScope {
212
212
213 title: applicationWindow.title
213 title: applicationWindow.title
214 windowMoving: moveHandler.moving && !altDragHandler.dragging
214 windowMoving: moveHandler.moving && !altDragHandler.dragging
215+ panelState: root.panelState
215
216
216 opacity: root.hasDecoration ? Math.min(1, root.showDecoration) : 0
217 opacity: root.hasDecoration ? Math.min(1, root.showDecoration) : 0
217 Behavior on opacity { UbuntuNumberAnimation { } }
218 Behavior on opacity { UbuntuNumberAnimation { } }
qml/Stage/WindowDecoration.qml+2
@@ -34,6 +34,7 @@ MouseArea {
34 property var menu: undefined
34 property var menu: undefined
35 property bool enableMenus: true
35 property bool enableMenus: true
36 property bool windowMoving: false
36 property bool windowMoving: false
37+ property PanelState panelState
37
38
38 readonly property real buttonsWidth: buttons.width + row.spacing
39 readonly property real buttonsWidth: buttons.width + row.spacing
39
40
@@ -146,6 +147,7 @@ MouseArea {
146 enableKeyFilter: valid && root.active && root.enableMenus
147 enableKeyFilter: valid && root.active && root.enableMenus
147 unityMenuModel: root.menu
148 unityMenuModel: root.menu
148 windowMoving: root.windowMoving
149 windowMoving: root.windowMoving
150+ panelState: root.panelState
149
151
150 onPressed: root.onPressed(mouse)
152 onPressed: root.onPressed(mouse)
151 onPressedChangedEx: root.pressedChangedEx(pressed, pressedButtons, mouseX, mouseY)
153 onPressedChangedEx: root.pressedChangedEx(pressed, pressedButtons, mouseX, mouseY)
tests/qmltests/Stage/tst_DesktopStage.qml+2−5
@@ -44,10 +44,6 @@ Item {
44 value: false
44 value: false
45 }
45 }
46
46
47− PanelState {
48− id: panelState
49− }
50−
51 Component.onCompleted: {
47 Component.onCompleted: {
52 ApplicationMenusLimits.screenWidth = Qt.binding( function() { return stageLoader.width; } );
48 ApplicationMenusLimits.screenWidth = Qt.binding( function() { return stageLoader.width; } );
53 ApplicationMenusLimits.screenHeight = Qt.binding( function() { return stageLoader.height; } );
49 ApplicationMenusLimits.screenHeight = Qt.binding( function() { return stageLoader.height; } );
@@ -106,7 +102,7 @@ Item {
106 topLevelSurfaceList: topSurfaceList
102 topLevelSurfaceList: topSurfaceList
107 interactive: true
103 interactive: true
108 mode: "windowed"
104 mode: "windowed"
109− panelState: panelState
105+ panelState: PanelState {}
110 }
106 }
111 }
107 }
112 }
108 }
@@ -178,6 +174,7 @@ Item {
178
174
179 stage: stageLoader.status === Loader.Ready ? stageLoader.item : null
175 stage: stageLoader.status === Loader.Ready ? stageLoader.item : null
180 topLevelSurfaceList: topSurfaceList
176 topLevelSurfaceList: topSurfaceList
177+ property var panelState: stage ? stage.panelState : null
181
178
182 function init() {
179 function init() {
183 // wait until unity8-dash is up and running.
180 // wait until unity8-dash is up and running.