Krolyxon
Branch master

Branches

Refs →

aurora.configquickshellauroraChoice.qml

30 lines · 815 B · QML

1import QtQuick
2import QtQuick.Layouts
3
4// A settings row: label + a segmented pill where the primary cell slides to the choice. options: [{value, label}]
5RowLayout {
6 id: c
7 property string label: ""
8 property string keywords: "" // synonyms for the settings search (SetIndex reads them from the source)
9 property var options: []
10 property var value
11 signal picked(var v)
12 Layout.fillWidth: true
13 Layout.leftMargin: 18
14 spacing: 16
15 Text {
16 Layout.preferredWidth: 200
17 text: c.label
18 color: Theme.fg
19 elide: Text.ElideRight
20 font.family: Theme.ui
21 font.pixelSize: 15
22 }
23 Segmented {
24 Layout.fillWidth: true
25 implicitHeight: 46
26 options: c.options
27 value: c.value
28 onPicked: v => c.picked(v)
29 }
30}