mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-06 06:36:15 +00:00
Tray: more intuitive auto closing.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user