From 358fc5fe8929ebe877803f551cecb82be11b8843 Mon Sep 17 00:00:00 2001 From: lucy Date: Mon, 29 Dec 2025 22:48:47 +0100 Subject: [PATCH] fix centering issue in Mpris.qml --- modules/bar/Mpris.qml | 14 +++++++------- shell.qml | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/bar/Mpris.qml b/modules/bar/Mpris.qml index 7f75338..0679a6d 100644 --- a/modules/bar/Mpris.qml +++ b/modules/bar/Mpris.qml @@ -17,10 +17,10 @@ Item { // 1. Let Repeater loop through the ObjectModel for us Repeater { id: mprisRepeater - anchors.verticalCenter: parent.verticalCenter model: Mpris.players delegate: Item { + id: delegateItem required property var modelData implicitHeight: 34 @@ -46,10 +46,11 @@ Item { } RowLayout { id: delegateLayout + anchors.centerIn: parent // 2. 🕵️‍♀️ FILTER LOGIC // Check if this specific player is Spotify. // We verify 'modelData' exists and check the name. - property bool isSpotify: modelData && modelData.identity.toLowerCase().includes("spotify") + property bool isSpotify: delegateItem.modelData && delegateItem.modelData.identity.toLowerCase().includes("spotify") // 3. 👻 HIDE NON-SPOTIFY PLAYERS visible: isSpotify @@ -58,10 +59,10 @@ Item { Layout.preferredWidth: isSpotify ? Math.min(implicitWidth, 400) : 0 Layout.fillHeight: true - property string title: modelData.trackTitle - property string artist: modelData.trackArtist - property string artUrl: modelData.trackArtUrl - property bool isPlaying: modelData.isPlaying + property string title: delegateItem.modelData.trackTitle + property string artist: delegateItem.modelData.trackArtist + property string artUrl: delegateItem.modelData.trackArtUrl + property bool isPlaying: delegateItem.modelData.isPlaying spacing: 10 @@ -81,7 +82,6 @@ Item { // 📝 TEXT INFO ColumnLayout { - Layout.alignment: Qt.AlignVCenter spacing: 0 visible: parent.visible diff --git a/shell.qml b/shell.qml index e53f9eb..629223e 100644 --- a/shell.qml +++ b/shell.qml @@ -4,7 +4,6 @@ import Quickshell import "./modules/bar/" import "./modules/wallpaper/" import "./modules/notifications/" -import "./modules/settings/" ShellRoot { Variants {