add playing indicator to mpris

This commit is contained in:
lucy 2026-01-20 13:00:53 +01:00
parent 51ea9f0a84
commit 519eaa9d29

View File

@ -24,10 +24,21 @@ Rectangle {
return null; return null;
} }
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
implicitWidth: mprisText.implicitWidth implicitWidth: statusRow.implicitWidth
Row {
id: statusRow
property var combinedText: root.spotify.trackArtist + " - " + root.spotify.trackTitle + " "
property var status: !root.spotify.isPlaying ? "play_arrow" : "pause"
CustomText { CustomText {
id: mprisText id: mprisText
text: root.spotify != null ? root.spotify.trackArtist + " - " + root.spotify.trackTitle : "" text: root.spotify != null ? parent.combinedText : ""
}
CustomIcon {
id: mprisStatus
text: parent.status
}
} }
} }
MouseArea { MouseArea {