1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 14:05:38 -05:00

Animation improvements, fix SysTray

This commit is contained in:
bbedward
2025-07-14 13:50:00 -04:00
parent d5d45b11c3
commit fff7dace3b
9 changed files with 255 additions and 116 deletions

View File

@@ -64,10 +64,7 @@ Rectangle {
}
} else if (mouse.button === Qt.RightButton) {
if (trayItem.hasMenu) {
console.log("Right-click detected, showing menu for:", trayItem.title || "Unknown")
customTrayMenu.showMenu(mouse.x, mouse.y)
} else {
console.log("No menu available for:", trayItem.title || "Unknown")
}
}
}

View File

@@ -65,6 +65,7 @@ PanelWindow {
property real trayMenuY: 0
// Proxy objects for external connections
QtObject {
@@ -231,13 +232,14 @@ PanelWindow {
anchors.verticalCenter: parent.verticalCenter
visible: Prefs.showSystemTray
onMenuRequested: (menu, item, x, y) => {
topBar.currentTrayMenu = menu
topBar.currentTrayItem = item
topBar.trayMenuX = rightSection.x + rightSection.width - 400 - Theme.spacingL
topBar.trayMenuY = Theme.barHeight + Theme.spacingS
console.log("Showing menu at:", topBar.trayMenuX, topBar.trayMenuY)
if (topBar.shellRoot) {
topBar.shellRoot.currentTrayMenu = menu
topBar.shellRoot.currentTrayItem = item
topBar.shellRoot.trayMenuX = rightSection.x + rightSection.width - 400 - Theme.spacingL
topBar.shellRoot.trayMenuY = Theme.barHeight - Theme.spacingXS
topBar.shellRoot.showTrayMenu = true
}
menu.menuVisible = true
topBar.showTrayMenu = true
}
}