settings: more icons

This commit is contained in:
end-4
2025-09-01 22:19:16 +02:00
parent cdc38f7e6e
commit 9f69b8815a
19 changed files with 522 additions and 240 deletions
@@ -9,7 +9,18 @@ Flow {
id: root
Layout.fillWidth: true
spacing: 2
property list<var> options: []
property list<var> options: [
{
"displayName": "Option 1",
"icon": "check",
"value": 1
},
{
"displayName": "Option 2",
"icon": "close",
"value": 2
},
]
property var currentValue: null
signal selected(var newValue)
@@ -32,7 +43,8 @@ Flow {
}
leftmost: index === 0
rightmost: index === root.options.length - 1
buttonText: modelData.displayName;
buttonIcon: modelData.icon || ""
buttonText: modelData.displayName
toggled: root.currentValue === modelData.value
onClicked: {
root.selected(modelData.value);