on xenial help sign in
dismiss menus
e92b64fNick Dedekind
qml/Panel/Panel.qml+22−2
@@ -52,11 +52,11 @@ Item {
52 property string mode: "staged"
52 property string mode: "staged"
53
53
54 MouseArea {
54 MouseArea {
55+ id: backMouseEater
55 anchors.fill: parent
56 anchors.fill: parent
56 anchors.topMargin: panelHeight
57 anchors.topMargin: panelHeight
57− visible: !indicators.fullyClosed
58+ visible: false
58 enabled: visible
59 enabled: visible
59− onClicked: if (indicators.fullyOpened) indicators.hide();
60 hoverEnabled: true // should also eat hover events, otherwise they will pass through
60 hoverEnabled: true // should also eat hover events, otherwise they will pass through
61 }
61 }
62
62
@@ -277,6 +277,16 @@ Item {
277 }
277 }
278 }
278 }
279 }
279 }
280+ Binding {
281+ target: backMouseEater
282+ property: "visible"
283+ value: true
284+ when: __applicationMenus.fullyOpened
285+ }
286+ Connections {
287+ target: backMouseEater
288+ onClicked: __applicationMenus.hide();
289+ }
280 }
290 }
281 }
291 }
282
292
@@ -482,6 +492,16 @@ Item {
482 onEnabledChanged: {
492 onEnabledChanged: {
483 if (!enabled) hide();
493 if (!enabled) hide();
484 }
494 }
495+ Binding {
496+ target: backMouseEater
497+ property: "visible"
498+ value: true
499+ when: __indicators.fullyOpened
500+ }
501+ Connections {
502+ target: backMouseEater
503+ onClicked: __indicators.hide();
504+ }
485 }
505 }
486 }
506 }
487
507