From 466ce70f96f8bdde32260f6951c5cbb62cfc02a7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 31 Aug 2025 21:57:00 +0200 Subject: ... --- accounts/gkleen@sif/shell/quickshell/SystemTray.qml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'accounts/gkleen@sif/shell/quickshell/SystemTray.qml') diff --git a/accounts/gkleen@sif/shell/quickshell/SystemTray.qml b/accounts/gkleen@sif/shell/quickshell/SystemTray.qml index afed4bf0..ba678138 100644 --- a/accounts/gkleen@sif/shell/quickshell/SystemTray.qml +++ b/accounts/gkleen@sif/shell/quickshell/SystemTray.qml @@ -91,18 +91,35 @@ Item { } PopupWindow { + id: tooltip + + property bool nextVisible: (trayItem.tooltipTitle || trayItem.tooltipDescription) && (trayItemArea.containsMouse || tooltipMouseArea.containsMouse) && !menuAnchor.visible + anchor { item: trayItemArea edges: Edges.Bottom } - visible: (trayItem.tooltipTitle || trayItem.tooltipDescription) && trayItemArea.containsMouse && !menuAnchor.visible + + visible: false + onNextVisibleChanged: hangTimer.restart() + + Timer { + id: hangTimer + interval: 100 + onTriggered: tooltip.visible = tooltip.nextVisible + } color: "black" implicitWidth: Math.max(tooltipTitle.contentWidth, tooltipDescription.contentWidth) + 16 implicitHeight: tooltipTitle.contentHeight + tooltipDescription.contentHeight + 16 - WrapperItem { + WrapperMouseArea { + id: tooltipMouseArea + + hoverEnabled: true + enabled: true + margin: 8 Column { -- cgit v1.2.3