Customtray #3

Merged
Zacharias-Brohn merged 6 commits from customtray into main 2025-11-02 22:26:25 +01:00
2 changed files with 19 additions and 10 deletions
Showing only changes of commit 7b5ee719c4 - Show all commits
+9
View File
@@ -6,6 +6,7 @@ import QtQuick.Effects
import Caelestia
import Quickshell
import Quickshell.Widgets
import Quickshell.Hyprland
import Quickshell.Services.SystemTray
import qs.Modules
@@ -53,6 +54,13 @@ MouseArea {
anchor.margins {
left: -270
}
HyprlandFocusGrab {
id: grab
windows: [ trayMenu ]
onCleared: {
trayMenu.visible = false;
}
}
}
}
@@ -61,6 +69,7 @@ MouseArea {
root.item.activate();
} else if ( mouse.button === Qt.RightButton ) {
trayMenu.visible = !trayMenu.visible;
grab.active = true;
}
}
}
+10 -10
View File
@@ -20,17 +20,17 @@ PopupWindow {
menu: root.menu
}
HyprlandFocusGrab {
id: grab
windows: [ root ]
onCleared: {
root.visible = false;
}
}
// HyprlandFocusGrab {
// id: grab
// windows: [ root ]
// onCleared: {
// root.visible = false;
// }
// }
onVisibleChanged: {
grab.active = root.visible;
}
// onVisibleChanged: {
// grab.active = root.visible;
// }
Rectangle {
id: menuRect
anchors.fill: parent