replace wraperRectangle with normal rectangle

This commit is contained in:
lucy 2026-05-17 14:48:09 +02:00
commit a62d313b29
9 changed files with 77 additions and 38 deletions

View file

@ -6,8 +6,11 @@ import qs
import qs.widgets
import qs.settings
WrapperRectangle {
Rectangle {
id: root
required property double moduleHeight
implicitHeight: moduleHeight
implicitWidth: songLayout.implicitWidth + 32
property MprisPlayer spotify: {
for (const player of Mpris.players.values) {
if (player.identity === "Spotify")
@ -16,16 +19,18 @@ WrapperRectangle {
return null;
}
visible: spotify !== null && spotify.playbackState === MprisPlaybackState.Playing
leftMargin: 8
rightMargin: 8
clip: true
color: Colors.base01
radius: Config.rounding
child: RowLayout {
RowLayout {
id: songLayout
anchors.centerIn: root
MaterialIcon {
text: "music_note_2"
}
StyledText {
Layout.maximumWidth: 400
Layout.maximumHeight: Config.barHeight / 1.6
text: root.spotify?.trackTitle + " - " + root.spotify?.trackArtists
elide: Text.ElideRight
}