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:
parent
6a159a390a
commit
1b77f4882d
4 changed files with 46 additions and 31 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue