fix menu attr

This commit is contained in:
Damocles 2026-04-12 11:40:12 +02:00
parent 59458cade3
commit 09b73d7cb1

View file

@ -42,15 +42,13 @@ PanelWindow {
id: panel id: panel
x: Math.max(0, Math.min( x: Math.max(0, Math.min(
Math.round(menuWindow.anchorX - menuStack.implicitWidth / 2), Math.round(menuWindow.anchorX - menuStack.width / 2),
menuWindow.width - menuStack.implicitWidth menuWindow.width - menuStack.width
)) ))
y: M.Theme.barHeight y: M.Theme.barHeight
implicitWidth: menuStack.implicitWidth width: menuStack.width
implicitHeight: menuStack.implicitHeight height: menuStack.height
width: implicitWidth
height: implicitHeight
// Eat clicks inside the panel so they don't reach the dismiss area above // Eat clicks inside the panel so they don't reach the dismiss area above
MouseArea { MouseArea {
@ -69,8 +67,8 @@ PanelWindow {
StackView { StackView {
id: menuStack id: menuStack
implicitWidth: currentItem ? currentItem.implicitWidth : 0 width: currentItem ? currentItem.implicitWidth : 0
implicitHeight: 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
Component.onCompleted: { Component.onCompleted: {