diff --git a/shell/plugins/bar/Bar.qml b/shell/plugins/bar/Bar.qml index e013f72e..81de0711 100644 --- a/shell/plugins/bar/Bar.qml +++ b/shell/plugins/bar/Bar.qml @@ -730,22 +730,7 @@ Item { Item { anchors.fill: parent - MouseArea { - anchors.fill: parent - acceptedButtons: Qt.LeftButton | Qt.RightButton - onClicked: function(mouse) { - if (mouse.button === Qt.RightButton) { - root.openBarSettings() - mouse.accepted = true - } - } - onDoubleClicked: function(mouse) { - if (mouse.button !== Qt.RightButton) { - root.toggleTransparency() - mouse.accepted = true - } - } - } + CenterGestureArea { anchors.fill: parent } ModuleList { visible: !centerRoot.hasAnchor @@ -782,6 +767,8 @@ Item { Item { anchors.fill: parent + CenterGestureArea { anchors.fill: parent } + ModuleList { visible: !centerRoot.hasAnchor entries: centerRoot.entries @@ -812,6 +799,24 @@ Item { } } + component CenterGestureArea: MouseArea { + acceptedButtons: Qt.LeftButton | Qt.RightButton + + onClicked: function(mouse) { + if (mouse.button === Qt.RightButton) { + root.openBarSettings() + mouse.accepted = true + } + } + + onDoubleClicked: function(mouse) { + if (mouse.button !== Qt.RightButton) { + root.toggleTransparency() + mouse.accepted = true + } + } + } + component ModuleList: Loader { id: moduleListRoot