Compare commits
No commits in common. "d0f7c0872a1cbbe86926fade9bdf9cbc864cfd0a" and "e96ccf7f63852293e422a7a3febb888a4401a0d3" have entirely different histories.
d0f7c0872a
...
e96ccf7f63
3 changed files with 3 additions and 25 deletions
|
|
@ -15,7 +15,7 @@ Text {
|
||||||
font.family: M.Theme.iconFontFamily
|
font.family: M.Theme.iconFontFamily
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
layer.enabled: _hovered && !(parent && parent._hovered === true)
|
layer.enabled: _hovered
|
||||||
layer.effect: MultiEffect {
|
layer.effect: MultiEffect {
|
||||||
shadowEnabled: true
|
shadowEnabled: true
|
||||||
shadowColor: M.Theme.base05
|
shadowColor: M.Theme.base05
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ Text {
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
}
|
}
|
||||||
|
|
||||||
layer.enabled: _hovered && !(parent && parent._hovered === true)
|
layer.enabled: _hovered
|
||||||
layer.effect: MultiEffect {
|
layer.effect: MultiEffect {
|
||||||
shadowEnabled: true
|
shadowEnabled: true
|
||||||
shadowColor: M.Theme.base05
|
shadowColor: M.Theme.base05
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Effects
|
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Services.SystemTray
|
import Quickshell.Services.SystemTray
|
||||||
|
|
@ -20,34 +19,13 @@ RowLayout {
|
||||||
id: iconItem
|
id: iconItem
|
||||||
required property SystemTrayItem modelData
|
required property SystemTrayItem modelData
|
||||||
|
|
||||||
readonly property bool _needsAttention: modelData.status === SystemTrayItemStatus.NeedsAttention
|
|
||||||
property real _pulseOpacity: 1
|
|
||||||
|
|
||||||
implicitWidth: 18
|
implicitWidth: 18
|
||||||
implicitHeight: 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 {
|
M.ThemedIcon {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: iconItem.modelData.icon
|
source: iconItem.modelData.icon
|
||||||
tint: iconItem._needsAttention ? M.Theme.base08 : M.Theme.base0D
|
tint: 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 {
|
HoverHandler {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue