File tree Expand file tree Collapse file tree 4 files changed +93
-1
lines changed Expand file tree Collapse file tree 4 files changed +93
-1
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,7 @@ QML_RES_QML = \
352
352
qml/components/StorageLocations.qml \
353
353
qml/components/StorageOptions.qml \
354
354
qml/components/StorageSettings.qml \
355
+ qml/components/ThemeSettings.qml \
355
356
qml/components/TotalBytesIndicator.qml \
356
357
qml/controls/ContinueButton.qml \
357
358
qml/controls/CoreText.qml \
@@ -389,7 +390,8 @@ QML_RES_QML = \
389
390
qml/pages/settings/SettingsConnection.qml \
390
391
qml/pages/settings/SettingsDeveloper.qml \
391
392
qml/pages/settings/SettingsProxy.qml \
392
- qml/pages/settings/SettingsStorage.qml
393
+ qml/pages/settings/SettingsStorage.qml \
394
+ qml/pages/settings/SettingsTheme.qml
393
395
394
396
BITCOIN_QT_CPP = $(BITCOIN_QT_BASE_CPP)
395
397
if TARGET_WINDOWS
Original file line number Diff line number Diff line change 15
15
<file>components/Separator.qml</file>
16
16
<file>components/StorageOptions.qml</file>
17
17
<file>components/StorageSettings.qml</file>
18
+ <file>components/ThemeSettings.qml</file>
18
19
<file>components/TotalBytesIndicator.qml</file>
19
20
<file>controls/ContinueButton.qml</file>
20
21
<file>controls/CoreText.qml</file>
53
54
<file>pages/settings/SettingsDeveloper.qml</file>
54
55
<file>pages/settings/SettingsProxy.qml</file>
55
56
<file>pages/settings/SettingsStorage.qml</file>
57
+ <file>pages/settings/SettingsTheme.qml</file>
56
58
</qresource>
57
59
<qresource prefix="/icons">
58
60
<file alias="arrow-down">res/icons/arrow-down.png</file>
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2023 The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+
5
+ import QtQuick 2.15
6
+ import QtQuick.Controls 2.15
7
+ import QtQuick.Layouts 1.15
8
+ import Qt.labs.settings 1.0
9
+ import "../controls"
10
+
11
+ ColumnLayout {
12
+ id: root
13
+ spacing: 4
14
+
15
+ Settings {
16
+ id: settings
17
+ }
18
+
19
+ Setting {
20
+ Layout .fillWidth : true
21
+ header: qsTr (" Light" )
22
+ actionItem: Button {
23
+ anchors .centerIn : parent
24
+ visible: ! Theme .dark
25
+ icon .source : " image://images/check"
26
+ icon .color : Theme .color .neutral9
27
+ icon .height : 24
28
+ icon .width : 24
29
+ background: null
30
+
31
+ Behavior on icon .color {
32
+ ColorAnimation { duration: 150 }
33
+ }
34
+ }
35
+ onClicked: {
36
+ Theme .dark = false
37
+ }
38
+ }
39
+ Separator { Layout .fillWidth : true }
40
+ Setting {
41
+ Layout .fillWidth : true
42
+ header: qsTr (" Dark" )
43
+ actionItem: Button {
44
+ anchors .centerIn : parent
45
+ visible: Theme .dark
46
+ icon .source : " image://images/check"
47
+ icon .color : Theme .color .neutral9
48
+ icon .height : 24
49
+ icon .width : 24
50
+ background: null
51
+
52
+ Behavior on icon .color {
53
+ ColorAnimation { duration: 150 }
54
+ }
55
+ }
56
+ onClicked: {
57
+ Theme .dark = true ;
58
+ }
59
+ }
60
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2023 The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+
5
+ import QtQuick 2.15
6
+ import QtQuick.Controls 2.15
7
+ import QtQuick.Layouts 1.15
8
+ import "../../controls"
9
+ import "../../components"
10
+
11
+ Page {
12
+ property alias navLeftDetail: navbar .leftDetail
13
+ property alias navMiddleDetail: navbar .middleDetail
14
+
15
+ background: null
16
+ implicitWidth: 450
17
+ leftPadding: 20
18
+ rightPadding: 20
19
+ topPadding: 30
20
+
21
+ header: NavigationBar {
22
+ id: navbar
23
+ }
24
+ ThemeSettings {
25
+ width: Math .min (parent .width , 450 )
26
+ anchors .horizontalCenter : parent .horizontalCenter
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments