mirror of
https://github.com/lubosz/overte.git
synced 2025-04-13 06:42:10 +02:00
Better preferences dialog initial state
This commit is contained in:
parent
d9651c6d4b
commit
18d6a09dc9
3 changed files with 12 additions and 0 deletions
|
@ -62,6 +62,13 @@ Window {
|
|||
|
||||
sections.push(sectionBuilder.createObject(prefControls, { name: category }));
|
||||
}
|
||||
|
||||
if (sections.length) {
|
||||
sections[0].expanded = true;
|
||||
if (sections.length === 1) {
|
||||
sections[0].expandable = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Flickable {
|
||||
|
|
|
@ -7,6 +7,7 @@ import "."
|
|||
|
||||
Preference {
|
||||
id: root
|
||||
property bool expandable: true
|
||||
property bool expanded: false
|
||||
property string name: "Header"
|
||||
property real spacing: 8
|
||||
|
@ -42,7 +43,10 @@ Preference {
|
|||
|
||||
VrControls.FontAwesome {
|
||||
id: toggle
|
||||
width: root.expandable ? height : 0
|
||||
anchors { left: parent.left; top: parent.top; margins: root.spacing }
|
||||
visible: root.expandable
|
||||
enabled: root.expandable
|
||||
rotation: root.expanded ? 0 : -90
|
||||
text: "\uf078"
|
||||
Behavior on rotation { PropertyAnimation {} }
|
||||
|
|
|
@ -20,6 +20,7 @@ DISTFILES += \
|
|||
../../interface/resources/qml/controls/*.qml \
|
||||
../../interface/resources/qml/dialogs/*.qml \
|
||||
../../interface/resources/qml/dialogs/fileDialog/*.qml \
|
||||
../../interface/resources/qml/dialogs/preferences/*.qml \
|
||||
../../interface/resources/qml/desktop/*.qml \
|
||||
../../interface/resources/qml/menus/*.qml \
|
||||
../../interface/resources/qml/styles/*.qml \
|
||||
|
|
Loading…
Reference in a new issue