File tree Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -307,8 +307,10 @@ QML_RES_QML = \
307
307
qml/controls/OptionButton.qml \
308
308
qml/controls/OptionSwitch.qml \
309
309
qml/controls/ProgressIndicator.qml \
310
+ qml/controls/qmldir \
310
311
qml/controls/Setting.qml \
311
312
qml/controls/TextButton.qml \
313
+ qml/controls/Theme.qml \
312
314
qml/pages/initerrormessage.qml \
313
315
qml/pages/stub.qml
314
316
Original file line number Diff line number Diff line change 10
10
<file>controls/OptionButton.qml</file>
11
11
<file>controls/OptionSwitch.qml</file>
12
12
<file>controls/ProgressIndicator.qml</file>
13
+ <file>controls/qmldir</file>
13
14
<file>controls/Setting.qml</file>
14
15
<file>controls/TextButton.qml</file>
16
+ <file>controls/Theme.qml</file>
15
17
<file>pages/initerrormessage.qml</file>
16
18
<file>pages/stub.qml</file>
17
19
</qresource>
Original file line number Diff line number Diff line change
1
+ pragma Singleton
2
+ import QtQuick 2.15
3
+
4
+ QtObject {
5
+ property bool dark: false
6
+ property QtObject color: QtObject {
7
+ property color white: " #FFFFFF"
8
+ property color background: dark ? " black" : " white"
9
+ property color orange: dark ? " #F89B2A" : " #F7931A"
10
+ property color red: dark ? " #EC6363" : " #EB5757"
11
+ property color green: dark ? " #36B46B" : " #27AE60"
12
+ property color blue: dark ? " #3CA3DE" : " #2D9CDB"
13
+ property color purple: dark ? " #C075DC" : " #BB6BD9"
14
+ property color neutral0: dark ? " #000000" : " #FFFFFF"
15
+ property color neutral1: dark ? " #1A1A1A" : " #F8F8F8"
16
+ property color neutral2: dark ? " #2D2D2D" : " #F4F4F4"
17
+ property color neutral3: dark ? " #444444" : " #EDEDED"
18
+ property color neutral4: dark ? " #5C5C5C" : " #DEDEDE"
19
+ property color neutral5: dark ? " #787878" : " #BBBBBB"
20
+ property color neutral6: dark ? " #949494" : " #999999"
21
+ property color neutral7: dark ? " #B0B0B0" : " #777777"
22
+ property color neutral8: dark ? " #CCCCCC" : " #404040"
23
+ property color neutral9: dark ? " #FFFFFF" : " #000000"
24
+ }
25
+ function toggleDark () {
26
+ dark = ! dark
27
+ }
28
+ }
Original file line number Diff line number Diff line change
1
+ singleton Theme 1.0 Theme.qml
You can’t perform that action at this time.
0 commit comments