diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-16 00:37:31 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-16 00:46:52 +0800 |
| commit | 3352b13c1116764e30d464226b0dfc8423a0c295 (patch) | |
| tree | f5f162597e616503d1390db46d0c931f912ea8aa /bar | |
| parent | a99a595ed3fda535e53f4aa455a57ff87d6122a5 (diff) | |
mpris: better pause look
Diffstat (limited to 'bar')
| -rw-r--r-- | bar/Mpris.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bar/Mpris.qml b/bar/Mpris.qml index 2ec644e..81a9bc8 100644 --- a/bar/Mpris.qml +++ b/bar/Mpris.qml @@ -97,9 +97,14 @@ Item { Layout.preferredHeight: childrenRect.height width: Bar.appIconSize height: Bar.appIconSize + + opacity: activePlayer.playbackState === MprisPlaybackState.Playing ? 1 : Bar.mediaPausedOpacity * 1.1 + + // put shadow Image { id: image anchors.fill: parent + source: activePlayer?.trackArtUrl fillMode: Image.PreserveAspectFit antialiasing: true @@ -118,10 +123,25 @@ Item { source: image maskSource: mask } + + Behavior on opacity { + NumberAnimation { + duration: General.animateDuration / 4 + easing.type: Easing.InOutQuad + } + } } IText { animate: true + opacity: activePlayer.playbackState === MprisPlaybackState.Playing ? 1 : Bar.mediaPausedOpacity text: root.cleanedTitle + + Behavior on opacity { + NumberAnimation { + duration: General.animateDuration / 4 + easing.type: Easing.InOutQuad + } + } } } } |
