From 690fa9674e117e3169fddfa9f72b6563ee83606b Mon Sep 17 00:00:00 2001 From: quadbyte Date: Mon, 11 Aug 2025 10:44:16 -0400 Subject: [PATCH] TrayMenu wrapped in NPanel: clicking outside closes the menu (and panel) --- Modules/Bar/Tray.qml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Modules/Bar/Tray.qml b/Modules/Bar/Tray.qml index 5ae2c99..6b3334f 100644 --- a/Modules/Bar/Tray.qml +++ b/Modules/Bar/Tray.qml @@ -97,6 +97,7 @@ Item { const menuY = (Style.barHeight * scaling) trayMenu.menu = modelData.menu trayMenu.showAt(parent, menuX, menuY) + trayPanel.show() } else { console.log("Tray: no menu available for", modelData.id, "or trayMenu not set") @@ -116,8 +117,20 @@ Item { } } - // Attached TrayMenu - TrayMenu { - id: trayMenu + // Attached TrayMenu drop down + NPanel { + id: trayPanel + showOverlay: false // no colors overlay even if activated in settings + Connections { + target: trayPanel + ignoreUnknownSignals: true + function onDismissed() { + trayPanel.visible = false + trayMenu.hideMenu() + } + } + TrayMenu { + id: trayMenu + } } }