on xenial help sign in
fix the nested hover event
0ec4a5dLukáš Tinkl
qml/Panel/Panel.qml+21−20
@@ -115,7 +115,6 @@ Item {
115 }
115 }
116
116
117 MouseArea {
117 MouseArea {
118− id: mouseArea
119 anchors {
118 anchors {
120 top: parent.top
119 top: parent.top
121 left: parent.left
120 left: parent.left
@@ -125,6 +124,26 @@ Item {
125 hoverEnabled: true
124 hoverEnabled: true
126 onClicked: { if (callHint.visible) { callHint.showLiveCall(); } }
125 onClicked: { if (callHint.visible) { callHint.showLiveCall(); } }
127 onDoubleClicked: PanelState.maximize()
126 onDoubleClicked: PanelState.maximize()
127+
128+ // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
129+ // cf. https://bugreports.qt.io/browse/QTBUG-32909
130+ WindowControlButtons {
131+ id: windowControlButtons
132+ objectName: "panelWindowControlButtons"
133+ anchors {
134+ left: parent.left
135+ top: parent.top
136+ leftMargin: units.gu(1)
137+ topMargin: units.gu(0.5)
138+ bottomMargin: units.gu(0.5)
139+ }
140+ height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
141+ visible: PanelState.buttonsVisible && parent.containsMouse && !root.locked && !callHint.visible
142+ active: PanelState.buttonsVisible
143+ onClose: PanelState.close()
144+ onMinimize: PanelState.minimize()
145+ onMaximize: PanelState.maximize()
146+ }
128 }
147 }
129
148
130 IndicatorsMenu {
149 IndicatorsMenu {
@@ -163,24 +182,6 @@ Item {
163 }
182 }
164 }
183 }
165
184
166− WindowControlButtons {
167− id: windowControlButtons
168− objectName: "panelWindowControlButtons"
169− anchors {
170− left: parent.left
171− top: parent.top
172− leftMargin: units.gu(1)
173− topMargin: units.gu(0.5)
174− bottomMargin: units.gu(0.5)
175− }
176− height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
177− visible: PanelState.buttonsVisible && mouseArea.containsMouse && !root.locked && !callHint.visible
178− active: PanelState.buttonsVisible
179− onClose: PanelState.close()
180− onMinimize: PanelState.minimize()
181− onMaximize: PanelState.maximize()
182− }
183−
184 Label {
185 Label {
185 id: titleLabel
186 id: titleLabel
186 objectName: "windowDecorationTitle"
187 objectName: "windowDecorationTitle"
@@ -215,7 +216,7 @@ Item {
215 id: __callHint
216 id: __callHint
216 anchors {
217 anchors {
217 top: parent.top
218 top: parent.top
218− left: windowControlButtons.visible ? windowControlButtons.right : parent.left
219+ left: parent.left
219 }
220 }
220 height: indicators.minimizedPanelHeight
221 height: indicators.minimizedPanelHeight
221 visible: active && indicators.state == "initial"
222 visible: active && indicators.state == "initial"