ActiveWindow+MediaMini: auto min & max width

This commit is contained in:
LemmyCook 2025-09-09 08:23:34 -04:00
parent 5e23476089
commit 4455074493
2 changed files with 6 additions and 4 deletions

View file

@ -33,8 +33,9 @@ RowLayout {
readonly property bool showIcon: (widgetSettings.showIcon !== undefined) ? widgetSettings.showIcon : widgetMetadata.showIcon
readonly property real minWidth: 160
readonly property real maxWidth: 400
// 5% of total width
readonly property real minWidth: Math.max(1, screen.width * 0.05)
readonly property real maxWidth: minWidth * 2
Layout.alignment: Qt.AlignVCenter
spacing: Style.marginS * scaling
visible: getTitle() !== ""

View file

@ -38,8 +38,9 @@ RowLayout {
readonly property string visualizerType: (widgetSettings.visualizerType !== undefined && widgetSettings.visualizerType
!== "") ? widgetSettings.visualizerType : widgetMetadata.visualizerType
readonly property real minWidth: 160
readonly property real maxWidth: 400
// 5% of total width
readonly property real minWidth: Math.max(1, screen.width * 0.05)
readonly property real maxWidth: minWidth * 2
function getTitle() {
return MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - ${MediaService.trackArtist}` : "")