fix flyouts on multiple monitors again?

This commit is contained in:
Damocles 2026-04-12 15:36:11 +02:00
parent 75a94628ad
commit c59a2c622d
6 changed files with 9 additions and 7 deletions

View file

@ -34,7 +34,7 @@ RowLayout {
.filter(s => s).join("\n") || iconItem.modelData.title;
if (hovered && tip) {
M.FlyoutState.text = tip;
M.FlyoutState.itemX = iconItem.mapToGlobal(iconItem.width / 2, 0).x;
M.FlyoutState.itemX = iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0);
M.FlyoutState.screen = QsWindow.window?.screen ?? null;
M.FlyoutState.visible = true;
} else if (!hovered) {
@ -69,7 +69,7 @@ RowLayout {
sourceComponent: M.TrayMenu {
handle: iconItem.modelData.menu
screen: root.bar.screen
anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x
anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
onMenuClosed: {
menuLoader.active = false;
root._activeMenu = null;