diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-17 23:38:28 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-17 23:38:28 +0800 |
| commit | 9826f860f140d9b39e76ffa143f25f0104c03e1b (patch) | |
| tree | 2634b243800c48eef696fad4e4bd33c3bdfde7b1 /bar | |
| parent | ca99b4d5756d607cbb1ee3a04d7efb250ba40ef5 (diff) | |
mpris: shadowm + better border radius
Diffstat (limited to 'bar')
| -rw-r--r-- | bar/Mpris.qml | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/bar/Mpris.qml b/bar/Mpris.qml index 7fb85ce..e730fe9 100644 --- a/bar/Mpris.qml +++ b/bar/Mpris.qml @@ -1,11 +1,13 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls +import QtQuick.Effects import Qt5Compat.GraphicalEffects import Quickshell import Quickshell.Widgets import Quickshell.Services.Mpris import qs.services as Services + import qs.config import qs.components @@ -102,28 +104,19 @@ Item { opacity: activePlayer?.playbackState === MprisPlaybackState.Playing ? 1 : Bar.mediaPausedOpacity - // put shadow - Image { - id: image - anchors.fill: parent - - source: activePlayer?.trackArtUrl || "" - fillMode: Image.PreserveAspectFit - antialiasing: true - asynchronous: true - visible: false - cache: false + RectangularShadow { + anchors.fill: image } - Rectangle { - id: mask + ClippingWrapperRectangle { + id: image anchors.fill: parent radius: 6 - visible: false - } - OpacityMask { - anchors.fill: parent - source: image - maskSource: mask + IconImage { + anchors.fill: parent + source: activePlayer?.trackArtUrl || "" + antialiasing: true + asynchronous: true + } } Behavior on opacity { |
