wrap mpris player selection pills into multiple rows with Flow

This commit is contained in:
Damocles 2026-04-18 14:21:00 +02:00
parent 1b6c2fee91
commit 22ca356fb5

View file

@ -306,20 +306,14 @@ Column {
// Player switcher
Item {
width: root.width
height: root.players.length > 1 ? 28 : 0
height: root.players.length > 1 ? _playerFlow.implicitHeight + 6 : 0
visible: root.players.length > 1
Flickable {
id: _switcher
anchors.centerIn: parent
width: Math.min(_playerRow.implicitWidth, parent.width - 16)
height: 22
contentWidth: _playerRow.implicitWidth
clip: true
Row {
id: _playerRow
height: 22
Flow {
id: _playerFlow
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: parent.width - 16
spacing: 6
Repeater {
@ -337,7 +331,6 @@ Column {
color: _active ? S.Theme.base02 : (pHover.hovered ? S.Theme.base02 : "transparent")
border.color: _active ? root.accentColor : S.Theme.base03
border.width: _active ? 1 : 0
anchors.verticalCenter: parent.verticalCenter
Text {
id: _pLabel
@ -364,4 +357,3 @@ Column {
}
}
}
}