on xenial help sign in
added pointer menu activation in staged mode
620290bNick Dedekind
qml/ApplicationMenus/MenuBar.qml+1−2
@@ -32,7 +32,7 @@ Item {
32
32
33 readonly property bool showRequested: d.longAltPressed || d.currentItem != null
33 readonly property bool showRequested: d.longAltPressed || d.currentItem != null
34
34
35− implicitWidth: row.width + units.gu(1)
35+ implicitWidth: row.width
36 height: parent.height
36 height: parent.height
37
37
38 function select(index) {
38 function select(index) {
@@ -66,7 +66,6 @@ Item {
66
66
67 Row {
67 Row {
68 id: row
68 id: row
69− anchors.left: parent.left
70 height: parent.height
69 height: parent.height
71 spacing: units.gu(2)
70 spacing: units.gu(2)
72
71
qml/Panel/Panel.qml+45−45
@@ -153,52 +153,52 @@ Item {
153 }
153 }
154 }
154 }
155
155
156− property bool showWindowControls: (PanelState.decorationsVisible && (containsMouse || menuBarLoader.menusRequested)) || PanelState.decorationsAlwaysVisible
156+ property bool showWindowControls: containsMouse || menuBarLoader.menusRequested
157−
157+
158+ Row {
159+ anchors.fill: parent
160+ spacing: units.gu(2)
161+
158− // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
162+ // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
159− // cf. https://bugreports.qt.io/browse/QTBUG-32909
163+ // cf. https://bugreports.qt.io/browse/QTBUG-32909
160− WindowControlButtons {
164+ WindowControlButtons {
161− id: windowControlButtons
165+ id: windowControlButtons
162− objectName: "panelWindowControlButtons"
166+ objectName: "panelWindowControlButtons"
163− anchors {
167+ height: indicators.minimizedPanelHeight
164− left: parent.left
168+ opacity: (PanelState.decorationsVisible && decorationMouseArea.showWindowControls) || PanelState.decorationsAlwaysVisible ? 1 : 0
165− top: parent.top
169+ visible: opacity != 0
170+ Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
171+
172+ active: PanelState.decorationsVisible || PanelState.decorationsAlwaysVisible
173+ windowIsMaximized: true
174+ onCloseClicked: PanelState.closeClicked()
175+ onMinimizeClicked: PanelState.minimizeClicked()
176+ onMaximizeClicked: PanelState.restoreClicked()
177+ closeButtonShown: PanelState.closeButtonShown
166 }
178 }
167− height: indicators.minimizedPanelHeight
168− opacity: decorationMouseArea.showWindowControls ? 1 : 0
169− visible: opacity != 0
170− Behavior on opacity { UbuntuNumberAnimation {} }
171−
172− active: PanelState.decorationsVisible || PanelState.decorationsAlwaysVisible
173− windowIsMaximized: true
174− onCloseClicked: PanelState.closeClicked()
175− onMinimizeClicked: PanelState.minimizeClicked()
176− onMaximizeClicked: PanelState.restoreClicked()
177− closeButtonShown: PanelState.closeButtonShown
178− }
179−
180− Loader {
181− id: menuBarLoader
182− anchors {
183− left: windowControlButtons.right
184− leftMargin: units.gu(3)
185− }
186− height: parent.height
187− opacity: windowControlButtons.opacity
188− visible: opacity != 0
189− active: __applicationMenus.model
190
179
180+ Loader {
181+ id: menuBarLoader
182+ height: parent.height
183+ opacity: decorationMouseArea.showWindowControls || PanelState.decorationsAlwaysVisible ? 1 : 0
184+ visible: opacity != 0
185+ Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
186+ active: __applicationMenus.model
187+
191− property bool menusRequested: menuBarLoader.item ? menuBarLoader.item.showRequested : false
188+ property bool menusRequested: menuBarLoader.item ? menuBarLoader.item.showRequested : false
192−
189+
193− sourceComponent: MenuBar {
190+ sourceComponent: MenuBar {
194− id: bar
191+ id: bar
192+ anchors.left: parent.left
193+ anchors.margins: units.gu(1)
195− height: menuBarLoader.height
194+ height: menuBarLoader.height
196− enableKeyFilter: valid && PanelState.decorationsVisible
195+ enableKeyFilter: valid && PanelState.decorationsVisible
197− unityMenuModel: registeredMenuModel.model
196+ unityMenuModel: __applicationMenus.model
198−
197+
199− Connections {
198+ Connections {
200− target: __applicationMenus
199+ target: __applicationMenus
201− onHide: bar.dismiss();
200+ onHide: bar.dismiss();
201+ }
202 }
202 }
203 }
203 }
204 }
204 }
@@ -267,7 +267,7 @@ Item {
267 }
267 }
268
268
269 enabled: !root.locked && model
269 enabled: !root.locked && model
270− opacity: !decorationMouseArea.showWindowControls && !indicators.expanded ? 1 : 0
270+ opacity: decorationMouseArea.showWindowControls || PanelState.decorationsAlwaysVisible ? 0 : 1
271 visible: opacity != 0
271 visible: opacity != 0
272 Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
272 Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
273
273
qml/Panel/PanelMenu.qml−1
@@ -84,7 +84,6 @@ Showable {
84 // eater
84 // eater
85 MouseArea {
85 MouseArea {
86 anchors.fill: content
86 anchors.fill: content
87− hoverEnabled: true
88 acceptedButtons: Qt.AllButtons
87 acceptedButtons: Qt.AllButtons
89 onWheel: wheel.accepted = true;
88 onWheel: wheel.accepted = true;
90 enabled: root.state != "initial"
89 enabled: root.state != "initial"