fix: close tray menus when hovering bar + showOnHover enabled

This commit is contained in:
2026-07-02 18:50:14 +02:00
parent 55dab8f7ce
commit 9126b04b10
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -3,12 +3,9 @@ pragma ComponentBehavior: Bound
import Quickshell import Quickshell
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import qs.Components
import qs.Modules import qs.Modules
import qs.Config import qs.Config
import qs.Helpers
import qs.Modules.SysTray import qs.Modules.SysTray
import qs.Modules.SysTray.Widgets
import qs.Modules.Network import qs.Modules.Network
import qs.Modules.Updates import qs.Modules.Updates
@@ -26,7 +23,7 @@ RowLayout {
const ch = childAt(x, height / 2) as WrappedLoader; const ch = childAt(x, height / 2) as WrappedLoader;
if (!ch || ch?.id === "spacer") { if (!ch || ch?.id === "spacer") {
if (!popouts.currentName.startsWith("traymenu")) if (!popouts.currentName.startsWith("traymenu") || Config.bar.tray.showOnHover)
popouts.hasCurrent = false; popouts.hasCurrent = false;
return; return;
} }
+1 -1
View File
@@ -15,7 +15,7 @@ Item {
if (visibilities.resources && panels.resourcesWrapper.x + panels.resourcesWrapper.width > root.x) if (visibilities.resources && panels.resourcesWrapper.x + panels.resourcesWrapper.width > root.x)
max -= panels.resources.nonAnimHeight; max -= panels.resources.nonAnimHeight;
if (panels.popouts.hasCurrent) if (panels.popouts.hasCurrent)
if (panels.popouts.current.x + panels.popouts.current.width > root.x && panels.popouts.current.x < root.x + root.width) if (panels.popouts.current?.x + panels.popouts.current?.width > root.x && panels.popouts.current?.x < root.x + root.width)
max -= panels.popouts.nonAnimHeight; max -= panels.popouts.nonAnimHeight;
return max; return max;
} }