fix fix menu attr

This commit is contained in:
Damocles 2026-04-12 11:45:16 +02:00
parent 09b73d7cb1
commit 21c16592dd
2 changed files with 6 additions and 6 deletions

View file

@ -64,7 +64,7 @@ RowLayout {
handle: iconItem.modelData.menu handle: iconItem.modelData.menu
screen: root.bar.screen screen: root.bar.screen
anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x
onClosed: menuLoader.active = false onMenuClosed: menuLoader.active = false
} }
} }
} }

View file

@ -17,7 +17,7 @@ PanelWindow {
// Global x of the icon center (from mapToGlobal), used to position the panel // Global x of the icon center (from mapToGlobal), used to position the panel
required property real anchorX required property real anchorX
signal closed() signal menuClosed()
color: "transparent" color: "transparent"
@ -34,7 +34,7 @@ PanelWindow {
// Click outside the menu panel dismiss // Click outside the menu panel dismiss
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: menuWindow.closed() onClicked: menuWindow.menuClosed()
} }
// Menu panel // Menu panel
@ -67,7 +67,7 @@ PanelWindow {
StackView { StackView {
id: menuStack id: menuStack
width: currentItem ? currentItem.implicitWidth : 0 width: currentItem ? currentItem.width : 0
height: currentItem ? currentItem.implicitHeight : 0 height: currentItem ? currentItem.implicitHeight : 0
// Push the root page once the stack is ready // Push the root page once the stack is ready
@ -92,7 +92,7 @@ PanelWindow {
required property QsMenuHandle handle required property QsMenuHandle handle
property bool isRoot: false property bool isRoot: false
implicitWidth: 220 width: 220
topPadding: 4 topPadding: 4
bottomPadding: 4 bottomPadding: 4
spacing: 2 spacing: 2
@ -222,7 +222,7 @@ PanelWindow {
}, StackView.Immediate); }, StackView.Immediate);
} else { } else {
entryItem.modelData.triggered(); entryItem.modelData.triggered();
menuWindow.closed(); menuWindow.menuClosed();
} }
} }
} }