This commit is contained in:
Ly-sec 2025-09-13 17:44:31 +02:00
parent 8c815146e6
commit 2a1e7832d6
6 changed files with 48 additions and 53 deletions

View file

@ -58,6 +58,10 @@ Item {
return MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - ${MediaService.trackArtist}` : "")
}
function calculatedVerticalHeight() {
return Math.round(Style.baseWidgetSize * 0.8 * scaling)
}
function calculatedHorizontalWidth() {
let total = Style.marginM * 2 * scaling // internal padding
if (showAlbumArt) {
@ -70,7 +74,7 @@ Item {
return total
}
implicitHeight: Math.round(Style.capsuleHeight * scaling)
implicitHeight: (barPosition === "left" || barPosition === "right") ? calculatedVerticalHeight() : Math.round(Style.barHeight * scaling)
implicitWidth: (barPosition === "left" || barPosition === "right") ? Math.round(Style.baseWidgetSize * 0.8 * scaling) : (rowLayout.implicitWidth + Style.marginM * 2 * scaling)
visible: MediaService.currentPlayer !== null && MediaService.canPlay