Tray: more intuitive auto closing.

This commit is contained in:
ItsLemmy
2025-11-11 10:35:50 -05:00
parent 9d25df5c4f
commit 33350497de

View File

@@ -173,6 +173,12 @@ Rectangle {
function toggleDrawer(button) {
TooltipService.hideImmediately()
// Close the tray menu if it's open
if (trayMenuWindow && trayMenuWindow.visible) {
trayMenuWindow.close()
}
const panel = PanelService.getPanel("trayDrawerPanel", root.screen)
if (panel) {
panel.widgetSection = root.section
@@ -325,6 +331,12 @@ Rectangle {
return
}
// Close the drawer if it's open (when opening menu for pinned item)
const drawerPanel = PanelService.getPanel("trayDrawerPanel", screen)
if (drawerPanel && drawerPanel.visible) {
drawerPanel.close()
}
if (modelData.hasMenu && modelData.menu && trayMenu.item) {
trayMenuWindow.open()