diff --git a/bar/Media.qml b/bar/Media.qml index b28e1dd..f0f12c9 100644 --- a/bar/Media.qml +++ b/bar/Media.qml @@ -12,7 +12,7 @@ Item { property bool borderless: Config.options.bar.borderless Layout.fillHeight: true - implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2 + implicitWidth: mediaLabel.implicitWidth implicitHeight: Appearance.sizes.barHeight Timer { @@ -37,45 +37,13 @@ Item { } } } - - RowLayout { - id: rowLayout - - spacing: 4 - anchors.fill: parent - visible: MprisController.hasPlayers - CircularProgress { - id: circularProgress - visible: false && MprisController.hasPlayers && MprisController.activePlayer().lengthSupported - Layout.alignment: Qt.AlignVCenter - Layout.leftMargin: rowLayout.spacing - lineWidth: 2 - value: MprisController.activePlayer().lengthSupported ? MprisController.activePlayer()?.position / MprisController.activePlayer()?.length : 0 - implicitSize: 26 - colSecondary: Appearance.colors.colSecondaryContainer - colPrimary: Appearance.m3colors.m3onSecondaryContainer - enableAnimation: false - - MaterialSymbol { - visible: MprisController.hasPlayers && MprisController.activePlayer().lengthSupported - anchors.centerIn: parent - fill: 1 - text: MprisController.activePlayer()?.isPlaying ? "music_note" : "pause" - iconSize: Appearance.font.pixelSize.normal - color: Appearance.m3colors.m3onSecondaryContainer - } - } - - StyledText { - visible: Config.options.bar.verbose - width: rowLayout.width - (circularProgress.size + rowLayout.spacing * 2) - Layout.alignment: Qt.AlignCenter - Layout.fillWidth: true - Layout.rightMargin: rowLayout.spacing - horizontalAlignment: Text.AlignHCenter - elide: Text.ElideRight - color: Appearance.colors.colOnLayer1 - text: `${MprisController.activePlayer()?.trackTitle}${MprisController.activePlayer()?.trackArtist ? ' • ' + MprisController.activePlayer().trackArtist : ''}` - } + StyledText { + id: mediaLabel + visible: Config.options.bar.verbose + anchors.top: parent.top + anchors.bottom: parent.bottom + horizontalAlignment: Text.AlignHCenter + color: Appearance.colors.colOnLayer1 + text: `${MprisController.activePlayer()?.trackTitle}${MprisController.activePlayer()?.trackArtist ? ' • ' + MprisController.activePlayer().trackArtist : ''}` } }