diff --git a/settings/hyprland.nix b/settings/hyprland.nix index b9b48c1..4b6e580 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -656,18 +656,17 @@ in PopupWindow { id: trayPopup - anchor.window: bar - anchor.adjustment: PopupAdjustment.None + anchor.item: trayToggle + anchor.edges: Edges.Bottom | Edges.Right + anchor.gravity: Edges.Bottom | Edges.Left + anchor.adjustment: PopupAdjustment.Slide visible: false color: "transparent" - implicitWidth: trayContent.width + 2 - implicitHeight: trayContent.height + 2 + implicitWidth: trayRow.width + 24 + implicitHeight: 36 Rectangle { - id: trayContent - anchors.centerIn: parent - width: trayRow.width + 24 - height: 36 + anchors.fill: parent color: "#${c.base00}" border.color: "#${c.base03}" border.width: 1 @@ -681,21 +680,28 @@ in Repeater { model: SystemTray.items - Image { + Item { required property var modelData - source: modelData.icon - Layout.preferredWidth: 18 - Layout.preferredHeight: 18 - smooth: true + Layout.preferredWidth: 20 + Layout.preferredHeight: 20 + + Image { + anchors.fill: parent + source: modelData.icon + sourceSize.width: 20 + sourceSize.height: 20 + smooth: true + mipmap: true + } MouseArea { anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: (event) => { - if (event.button === Qt.RightButton && parent.modelData.hasMenu) { - parent.modelData.display(trayPopup, mouse.x, mouse.y); + if (event.button === Qt.RightButton && modelData.hasMenu) { + modelData.display(bar, event.x, event.y); } else { - parent.modelData.activate(); + modelData.activate(); } } }