From d191ac44b566f452757289b59704b64ad4dc10bb Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 25 Sep 2025 16:14:24 +1000 Subject: bar: add compact tray option Closes #659 --- modules/drawers/Drawers.qml | 1 + modules/drawers/Interactions.qml | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'modules/drawers') diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml index 4ade8c4..2ba79a4 100644 --- a/modules/drawers/Drawers.qml +++ b/modules/drawers/Drawers.qml @@ -96,6 +96,7 @@ Variants { visibilities.sidebar = false; visibilities.dashboard = false; panels.popouts.hasCurrent = false; + bar.closeTray(); } } diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index 56e2d6b..9579b15 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -68,8 +68,10 @@ CustomMouseArea { if (!utilitiesShortcutActive) visibilities.utilities = false; - if (!popouts.currentName.startsWith("traymenu") || (popouts.current?.depth ?? 0) <= 1) + if (!popouts.currentName.startsWith("traymenu") || (popouts.current?.depth ?? 0) <= 1) { popouts.hasCurrent = false; + bar.closeTray(); + } if (Config.bar.showOnHover) bar.isHovered = false; @@ -197,10 +199,12 @@ CustomMouseArea { } // Show popouts on hover - if (x < bar.implicitWidth) + if (x < bar.implicitWidth) { bar.checkPopout(y); - else if ((!popouts.currentName.startsWith("traymenu") || (popouts.current?.depth ?? 0) <= 1) && !inLeftPanel(panels.popouts, x, y)) + } else if ((!popouts.currentName.startsWith("traymenu") || (popouts.current?.depth ?? 0) <= 1) && !inLeftPanel(panels.popouts, x, y)) { popouts.hasCurrent = false; + bar.closeTray(); + } } // Monitor individual visibility changes -- cgit v1.2.3-freya