From b3989a13da2c68cfbf6bbb40f9f8e4fea7f5691f Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 1 Oct 2025 15:41:31 -0400 Subject: [PATCH] MediaMini: better behavior on smaller screen where the placeholder text may not fit in the capsule --- Modules/Bar/Widgets/MediaMini.qml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index ae960cd5..5c119ea1 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -191,19 +191,15 @@ Item { Item { id: titleContainer Layout.preferredWidth: { - if (!hasActivePlayer) { - // When no active player, take full width to center the placeholder - return mainContainer.width - Style.marginXXS * scaling * 2 - } // Calculate available width based on other elements in the row var iconWidth = (windowIcon.visible ? (Style.fontSizeL * scaling + Style.marginS * scaling) : 0) - var albumArtWidth = (showAlbumArt ? (18 * scaling + Style.marginS * scaling) : 0) + var albumArtWidth = (hasActivePlayer && showAlbumArt ? (18 * scaling + Style.marginS * scaling) : 0) var totalMargins = Style.marginXXS * scaling * 2 var availableWidth = mainContainer.width - iconWidth - albumArtWidth - totalMargins return Math.max(20 * scaling, availableWidth) } Layout.maximumWidth: Layout.preferredWidth - Layout.alignment: hasActivePlayer ? Qt.AlignVCenter : Qt.AlignCenter + Layout.alignment: Qt.AlignVCenter Layout.preferredHeight: titleText.height clip: true @@ -282,7 +278,7 @@ Item { width: parent.width property real scrollX: 0 - x: hasActivePlayer ? scrollX : 0 + x: scrollX RowLayout { spacing: 50 * scaling // Gap between text copies