Files
amnezia-client/client/ui/qml/Components/CountryUseCaseChips.qml
T
vkamn 11355e1de0 feat: new design system (#3280)
* refactor: focus controller refactoring

* feat: update to new design system

* feat: update to new desing system

* chore: bump version
2026-10-14 11:13:36 +08:00

42 lines
986 B
QML

import QtQuick
import "../Config"
import "../Controls2"
ListViewType {
id: root
property var listModel: null
readonly property var chips: root.listModel !== null ? root.listModel.useCases : []
visible: root.chips.length > 1
implicitHeight: root.visible ? 34 : 0
clip: false
orientation: ListView.Horizontal
spacing: 8
leftMargin: 16
rightMargin: 16
boundsBehavior: Flickable.StopAtBounds
interactive: contentWidth > width
model: root.chips
delegate: ChipType {
required property var modelData
readonly property string useCaseId: modelData.useCaseId
checked: root.listModel !== null && root.listModel.activeUseCaseId === useCaseId
text: "%1 · %2".arg(CountryRegionNames.useCaseName(root.listModel, useCaseId)).arg(modelData.count)
onClicked: {
if (root.listModel !== null) {
root.listModel.activeUseCaseId = useCaseId
}
}
}
}