diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-08-31 21:57:00 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-08-31 21:57:00 +0200 |
| commit | 466ce70f96f8bdde32260f6951c5cbb62cfc02a7 (patch) | |
| tree | 3d3120f6a1ace487d2db5a024411a467d55b9632 /accounts/gkleen@sif/shell/quickshell/SystemTray.qml | |
| parent | 828893e930886872fcf612bc8958d33fee73b5df (diff) | |
| download | nixos-466ce70f96f8bdde32260f6951c5cbb62cfc02a7.tar nixos-466ce70f96f8bdde32260f6951c5cbb62cfc02a7.tar.gz nixos-466ce70f96f8bdde32260f6951c5cbb62cfc02a7.tar.bz2 nixos-466ce70f96f8bdde32260f6951c5cbb62cfc02a7.tar.xz nixos-466ce70f96f8bdde32260f6951c5cbb62cfc02a7.zip | |
...
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/SystemTray.qml')
| -rw-r--r-- | accounts/gkleen@sif/shell/quickshell/SystemTray.qml | 21 |
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 { |
