From 87be2c720a09fc491423cbc0e9c50871007362a1 Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 17:38:05 +0200 Subject: [PATCH] tray icons: hover glow --- modules/Tray.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/Tray.qml b/modules/Tray.qml index bbedb19..5f0650b 100644 --- a/modules/Tray.qml +++ b/modules/Tray.qml @@ -21,6 +21,7 @@ RowLayout { required property SystemTrayItem modelData readonly property bool _needsAttention: modelData.status === SystemTrayItemStatus.NeedsAttention + property bool _hovered: false property real _pulseOpacity: 1 implicitWidth: 18 @@ -38,11 +39,11 @@ RowLayout { anchors.fill: parent opacity: iconItem._pulseOpacity - layer.enabled: iconItem._needsAttention + layer.enabled: iconItem._needsAttention || iconItem._hovered layer.effect: MultiEffect { shadowEnabled: true - shadowColor: M.Theme.base08 - shadowBlur: 0.8 + shadowColor: iconItem._needsAttention ? M.Theme.base08 : M.Theme.base05 + shadowBlur: iconItem._needsAttention ? 0.8 : 0.5 shadowVerticalOffset: 0 shadowHorizontalOffset: 0 } @@ -56,6 +57,7 @@ RowLayout { HoverHandler { onHoveredChanged: { + iconItem._hovered = hovered; const tip = [iconItem.modelData.tooltipTitle, iconItem.modelData.tooltipDescription].filter(s => s).join("\n") || iconItem.modelData.title; if (hovered && tip) { M.FlyoutState.text = tip;