diff --git a/modules/MprisMenu.qml b/modules/MprisMenu.qml index d1e9f2b..b4bfb29 100644 --- a/modules/MprisMenu.qml +++ b/modules/MprisMenu.qml @@ -9,23 +9,35 @@ M.PopupPanel { required property MprisPlayer player - // Album art placeholder (or real art if available) - Rectangle { + // Album art + Item { width: menuWindow.panelWidth - height: 80 - color: M.Theme.base02 - radius: M.Theme.radius + height: _artImg.status === Image.Ready ? 140 : 60 + clip: true + + Rectangle { + anchors.fill: parent + color: M.Theme.base02 + } Image { + id: _artImg anchors.fill: parent source: menuWindow.player?.trackArtUrl ?? "" fillMode: Image.PreserveAspectCrop visible: status === Image.Ready + } - // Round top corners to match panel - layer.enabled: true - layer.effect: Item { - // simple clip — the panel background behind handles the rounding + // Gradient fade at the bottom so art blends into the panel + Rectangle { + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + height: 40 + visible: _artImg.visible + gradient: Gradient { + GradientStop { position: 0; color: "transparent" } + GradientStop { position: 1; color: M.Theme.base01 } } } @@ -36,7 +48,7 @@ M.PopupPanel { color: M.Theme.base04 font.pixelSize: 28 font.family: M.Theme.iconFontFamily - visible: !menuWindow.player?.trackArtUrl + visible: _artImg.status !== Image.Ready } }