right sidebar: volume mixer: use listview, add separator

This commit is contained in:
end-4
2025-07-17 23:43:20 +07:00
parent 12e107448b
commit fdc05ee4a0
@@ -40,44 +40,33 @@ Item {
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
Flickable { ListView {
id: flickable id: listView
anchors.fill: parent
contentHeight: volumeMixerColumnLayout.height
clip: true
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Rectangle {
width: flickable.width
height: flickable.height
radius: Appearance.rounding.normal
}
}
ColumnLayout {
id: volumeMixerColumnLayout
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 10
spacing: 10
Repeater {
model: root.appPwNodes model: root.appPwNodes
clip: true
anchors {
fill: parent
topMargin: 10
bottomMargin: 10
}
spacing: 6
VolumeMixerEntry { delegate: VolumeMixerEntry {
Layout.fillWidth: true // Layout.fillWidth: true
anchors {
left: parent.left
right: parent.right
leftMargin: 10
rightMargin: 10
}
required property var modelData required property var modelData
node: modelData node: modelData
} }
} }
}
}
// Placeholder when list is empty // Placeholder when list is empty
Item { Item {
anchors.fill: flickable anchors.fill: listView
visible: opacity > 0 visible: opacity > 0
opacity: (root.appPwNodes.length === 0) ? 1 : 0 opacity: (root.appPwNodes.length === 0) ? 1 : 0
@@ -109,6 +98,15 @@ Item {
} }
} }
} }
// Separator
Rectangle {
color: Appearance.m3colors.m3outlineVariant
implicitHeight: 1
Layout.fillWidth: true
}
// Device selector // Device selector
ButtonGroup { ButtonGroup {
id: deviceSelectorRowLayout id: deviceSelectorRowLayout