From 9dc4067a59fdabcbca88ce79bb7eb8218948055c Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 26 May 2026 10:21:56 +0100 Subject: [PATCH] quickshell: fix tray menu, improve popup styling Co-Authored-By: Claude Opus 4.6 --- settings/hyprland.nix | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 07be4e4..b9b48c1 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -634,17 +634,17 @@ in // Tray toggle button Item { + id: trayToggle Layout.preferredWidth: 28 Layout.preferredHeight: 30 Layout.rightMargin: 6 Text { anchors.centerIn: parent - text: "\ue0b2" + text: trayPopup.visible ? "\u25b6" : "\u25c0" color: "#${c.base05}" font.family: "FiraMono Nerd Font" - font.pixelSize: 13 - textFormat: Text.PlainText + font.pixelSize: 10 } MouseArea { @@ -657,19 +657,21 @@ in PopupWindow { id: trayPopup anchor.window: bar - anchor.rect.x: bar.width - 220 - anchor.rect.y: bar.height + anchor.adjustment: PopupAdjustment.None visible: false - color: "#${c.base00}" - implicitWidth: trayRow.width + 24 - implicitHeight: 40 + color: "transparent" + implicitWidth: trayContent.width + 2 + implicitHeight: trayContent.height + 2 Rectangle { - anchors.fill: parent + id: trayContent + anchors.centerIn: parent + width: trayRow.width + 24 + height: 36 color: "#${c.base00}" border.color: "#${c.base03}" border.width: 1 - radius: 8 + radius: 6 RowLayout { id: trayRow @@ -691,7 +693,7 @@ in acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: (event) => { if (event.button === Qt.RightButton && parent.modelData.hasMenu) { - parent.modelData.menu.open(); + parent.modelData.display(trayPopup, mouse.x, mouse.y); } else { parent.modelData.activate(); }