From d8d602d30f4c242eb2957ce870e3929d7cd682fc Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 17:23:35 +0200 Subject: [PATCH 1/2] tray: needs-attention glow and pulse --- modules/Tray.qml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/modules/Tray.qml b/modules/Tray.qml index c22df94..c57a467 100644 --- a/modules/Tray.qml +++ b/modules/Tray.qml @@ -1,4 +1,5 @@ import QtQuick +import QtQuick.Effects import QtQuick.Layouts import Quickshell import Quickshell.Services.SystemTray @@ -19,13 +20,34 @@ RowLayout { id: iconItem required property SystemTrayItem modelData + readonly property bool _needsAttention: modelData.status === SystemTrayItemStatus.NeedsAttention + property real _pulseOpacity: 1 + implicitWidth: 18 implicitHeight: 18 + SequentialAnimation { + running: iconItem._needsAttention + loops: Animation.Infinite + NumberAnimation { target: iconItem; property: "_pulseOpacity"; to: 0.3; duration: 400; easing.type: Easing.InOutQuad } + NumberAnimation { target: iconItem; property: "_pulseOpacity"; to: 1; duration: 400; easing.type: Easing.InOutQuad } + onRunningChanged: if (!running) iconItem._pulseOpacity = 1 + } + M.ThemedIcon { anchors.fill: parent source: iconItem.modelData.icon - tint: M.Theme.base0D + tint: iconItem._needsAttention ? M.Theme.base08 : M.Theme.base0D + opacity: iconItem._pulseOpacity + + layer.enabled: iconItem._needsAttention + layer.effect: MultiEffect { + shadowEnabled: true + shadowColor: M.Theme.base08 + shadowBlur: 0.8 + shadowVerticalOffset: 0 + shadowHorizontalOffset: 0 + } } HoverHandler { From d0f7c0872a1cbbe86926fade9bdf9cbc864cfd0a Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 17:25:22 +0200 Subject: [PATCH 2/2] fix hover glow: section glow covers whole module, children defer --- modules/BarIcon.qml | 2 +- modules/BarLabel.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/BarIcon.qml b/modules/BarIcon.qml index b499106..1a07d09 100644 --- a/modules/BarIcon.qml +++ b/modules/BarIcon.qml @@ -15,7 +15,7 @@ Text { font.family: M.Theme.iconFontFamily verticalAlignment: Text.AlignVCenter - layer.enabled: _hovered + layer.enabled: _hovered && !(parent && parent._hovered === true) layer.effect: MultiEffect { shadowEnabled: true shadowColor: M.Theme.base05 diff --git a/modules/BarLabel.qml b/modules/BarLabel.qml index 4c96a54..726197e 100644 --- a/modules/BarLabel.qml +++ b/modules/BarLabel.qml @@ -24,7 +24,7 @@ Text { font.family: root.font.family } - layer.enabled: _hovered + layer.enabled: _hovered && !(parent && parent._hovered === true) layer.effect: MultiEffect { shadowEnabled: true shadowColor: M.Theme.base05