diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-08-23 14:51:03 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-08-23 14:51:03 +0800 |
| commit | 84a87a37e3589043a7c698f45c2463d167b026a9 (patch) | |
| tree | 1f8f4e481a42d6940bc5c4398fb97bfb40b8753d | |
| parent | e801dd774243ecb88bb23c9e594d96b69af0bca8 (diff) | |
Mpris: albumArt with tint of accent colors
| -rw-r--r-- | bar/Mpris.qml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/bar/Mpris.qml b/bar/Mpris.qml index 7d14ba4..e2f0e7b 100644 --- a/bar/Mpris.qml +++ b/bar/Mpris.qml @@ -112,12 +112,26 @@ Item { anchors.fill: parent radius: 6 color: "transparent" - Image { + child: Image { + id: albumArt // IconImage makes it less crisp and blurry anchors.fill: parent source: activePlayer?.trackArtUrl || Quickshell.iconPath(AppSearch.guessIcon(activePlayer?.desktopEntry), "image-missing") antialiasing: true asynchronous: true + ColorOverlay { + property color rawColor: activePlayer?.playbackState === MprisPlaybackState.Playing ? Colors.background1 : Colors.background2 + anchors.fill: albumArt + source: albumArt + color: Qt.rgba(rawColor.r, rawColor.g, rawColor.b, General.accentTransparency) + + Behavior on color { + ColorAnimation { + duration: General.animationDuration / 4 + easing.type: Easing.InOutQuad + } + } + } } } |
