Tray: fix for hyprland (untested)

This commit is contained in:
ItsLemmy
2025-11-11 13:35:35 -05:00
parent 093b32803b
commit 8aa4254d57
6 changed files with 145 additions and 61 deletions
-45
View File
@@ -44,7 +44,6 @@ PanelWindow {
readonly property alias trayDrawerPanel: trayDrawerPanel
readonly property alias wallpaperPanel: wallpaperPanel
readonly property alias wifiPanel: wifiPanel
readonly property alias trayMenuWindow: trayMenuWindow
Component.onCompleted: {
Logger.d("MainScreen", "Initialized for screen:", screen?.name, "- Dimensions:", screen?.width, "x", screen?.height, "- Position:", screen?.x, ",", screen?.y)
@@ -286,7 +285,6 @@ PanelWindow {
TrayDrawerPanel {
id: trayDrawerPanel
screen: root.screen
trayMenuWindow: root.trayMenuWindow
z: 50
Component.onCompleted: {
@@ -317,49 +315,6 @@ PanelWindow {
}
}
// ----------------------------------------------
// Shared TrayMenu window for context menus (used by both Tray widget and TrayDrawerPanel)
PanelWindow {
id: trayMenuWindow
anchors.top: true
anchors.left: true
anchors.right: true
anchors.bottom: true
visible: false
color: Color.transparent
screen: root.screen
// Expose the trayMenu Loader directly
readonly property alias trayMenuLoader: trayMenu
function open() {
visible = true
}
function close() {
visible = false
if (trayMenu.item) {
trayMenu.item.hideMenu()
}
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
onClicked: trayMenuWindow.close()
}
Loader {
id: trayMenu
source: "../Bar/Extras/TrayMenu.qml"
onLoaded: {
if (item) {
item.screen = root.screen
}
}
}
}
// ----------------------------------------------
// Bar background placeholder - just for background positioning (actual bar content is in BarContentWindow)
Item {