Settings: reworked modular bar settings

- deleted NCard, we already have NBox
- assign a color to each widget for better overview when moving stuff
around
- minor QOL improvements to NComboBox
This commit is contained in:
LemmyCook 2025-08-22 18:37:48 -04:00
parent 6a159a390a
commit 1b77f4882d
4 changed files with 46 additions and 31 deletions

View file

@ -8,7 +8,7 @@ import qs.Widgets
ColumnLayout {
id: root
readonly property real preferredHeight: Style.baseWidgetSize * 1.25 * scaling
readonly property real preferredHeight: Style.baseWidgetSize * 1.35 * scaling
property string label: ""
property string description: ""
@ -39,7 +39,8 @@ ColumnLayout {
ComboBox {
id: combo
Layout.fillWidth: true
Layout.preferredWidth: 320 * scaling
Layout.preferredHeight: height
model: model
currentIndex: findIndexByKey(currentKey)
@ -128,5 +129,13 @@ ColumnLayout {
radius: Style.radiusM * scaling
}
}
// Update the currentIndex if the currentKey is changed externalyu
Connections {
target: root
function onCurrentKeyChanged() {
combo.currentIndex = root.findIndexByKey(currentKey)
}
}
}
}