summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/SystemTray.qml
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/SystemTray.qml')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/SystemTray.qml21
1 files changed, 19 insertions, 2 deletions
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 {
91 } 91 }
92 92
93 PopupWindow { 93 PopupWindow {
94 id: tooltip
95
96 property bool nextVisible: (trayItem.tooltipTitle || trayItem.tooltipDescription) && (trayItemArea.containsMouse || tooltipMouseArea.containsMouse) && !menuAnchor.visible
97
94 anchor { 98 anchor {
95 item: trayItemArea 99 item: trayItemArea
96 edges: Edges.Bottom 100 edges: Edges.Bottom
97 } 101 }
98 visible: (trayItem.tooltipTitle || trayItem.tooltipDescription) && trayItemArea.containsMouse && !menuAnchor.visible 102
103 visible: false
104 onNextVisibleChanged: hangTimer.restart()
105
106 Timer {
107 id: hangTimer
108 interval: 100
109 onTriggered: tooltip.visible = tooltip.nextVisible
110 }
99 111
100 color: "black" 112 color: "black"
101 113
102 implicitWidth: Math.max(tooltipTitle.contentWidth, tooltipDescription.contentWidth) + 16 114 implicitWidth: Math.max(tooltipTitle.contentWidth, tooltipDescription.contentWidth) + 16
103 implicitHeight: tooltipTitle.contentHeight + tooltipDescription.contentHeight + 16 115 implicitHeight: tooltipTitle.contentHeight + tooltipDescription.contentHeight + 16
104 116
105 WrapperItem { 117 WrapperMouseArea {
118 id: tooltipMouseArea
119
120 hoverEnabled: true
121 enabled: true
122
106 margin: 8 123 margin: 8
107 124
108 Column { 125 Column {