-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettingsPage.qml
131 lines (111 loc) · 3.69 KB
/
SettingsPage.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls.Material 2.15
import QtLevel 1.0
Page {
id: settingsPageRoot
header: ToolBar {
Label {
anchors.centerIn: parent
text: qsTr("Settings")
}
}
ListModel {
id: colorModel
ListElement { text: "Red"; value: Material.Red }
ListElement { text: "Pink"; value: Material.Pink }
ListElement { text: "Purple"; value: Material.Purple }
ListElement { text: "DeepPurple"; value: Material.DeepPurple }
ListElement { text: "Indigo"; value: Material.Indigo }
ListElement { text: "Blue"; value: Material.Blue }
ListElement { text: "LightBlue"; value: Material.LightBlue }
ListElement { text: "Cyan"; value: Material.Cyan }
ListElement { text: "Teal"; value: Material.Teal }
ListElement { text: "Green"; value: Material.Green }
ListElement { text: "LightGreen"; value: Material.LightGreen }
ListElement { text: "Lime"; value: Material.Lime }
ListElement { text: "Yellow"; value: Material.Yellow }
ListElement { text: "Amber"; value: Material.Amber }
ListElement { text: "Orange"; value: Material.Orange }
ListElement { text: "DeepOrange"; value: Material.DeepOrange }
ListElement { text: "Brown"; value: Material.Brown }
ListElement { text: "Grey"; value: Material.Grey }
ListElement { text: "BlueGrey"; value: Material.BlueGrey }
}
ColumnLayout {
anchors.fill: parent
spacing: 10
anchors.margins: 10
Label {
font.pointSize: 22
text: "Level options"
Layout.fillWidth: true
}
RowLayout {
spacing: 10
Layout.fillWidth: true
Label {
text: "Decimal places for degrees"
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
SpinBox {
from: 0
to: 10
value: settings.decimalPlaces
onValueChanged: settings.decimalPlaces = value
}
}
Label {
font.pointSize: 22
text: "App theming options"
Layout.fillWidth: true
}
RowLayout {
spacing: 10
Layout.fillWidth: true
Label {
text: "App theme"
Layout.fillWidth: true
}
ComboBox {
textRole: "text"
model: ListModel {
ListElement { text: "Light"; value: Material.Light }
ListElement { text: "Dark"; value: Material.Dark }
ListElement { text: "System"; value: Material.System }
}
}
}
RowLayout {
spacing: 10
Layout.fillWidth: true
Label {
text: "App primary color"
Layout.fillWidth: true
}
ComboBox {
textRole: "text"
currentIndex: settings.primary
onActivated: settings.primary = index
model: colorModel
}
}
RowLayout {
spacing: 10
Layout.fillWidth: true
Label {
text: "App accent color"
Layout.fillWidth: true
}
ComboBox {
textRole: "text"
currentIndex: settings.accent
onActivated: settings.accent = index
model: colorModel
}
}
Item { Layout.fillWidth: true; Layout.fillHeight: true }
}
}