diff options
| -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 { |
