File tree Expand file tree Collapse file tree 3 files changed +71
-0
lines changed Expand file tree Collapse file tree 3 files changed +71
-0
lines changed Original file line number Diff line number Diff line change @@ -335,6 +335,7 @@ QML_RES_QML = \
335
335
qml/components/ConnectionSettings.qml \
336
336
qml/components/DeveloperOptions.qml \
337
337
qml/components/PeersIndicator.qml \
338
+ qml/components/NetworkIndicator.qml \
338
339
qml/components/StorageLocations.qml \
339
340
qml/components/StorageOptions.qml \
340
341
qml/components/StorageSettings.qml \
Original file line number Diff line number Diff line change 8
8
<file>components/ConnectionSettings.qml</file>
9
9
<file>components/PeersIndicator.qml</file>
10
10
<file>components/DeveloperOptions.qml</file>
11
+ <file>components/NetworkIndicator.qml</file>
11
12
<file>components/StorageLocations.qml</file>
12
13
<file>components/StorageOptions.qml</file>
13
14
<file>components/StorageSettings.qml</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 "../controls"
8
+ import "../components"
9
+
10
+ import org.bitcoincore.qt 1.0
11
+
12
+ Button {
13
+ id: root
14
+ property color bgColor
15
+ property int textSize: 18
16
+ font .family : " Inter"
17
+ font .styleName : " Regular"
18
+ font .pixelSize : root .textSize
19
+ padding: 7
20
+ state: chainModel .currentNetworkName
21
+ contentItem: Text {
22
+ text: root .text
23
+ font: root .font
24
+ color: Theme .color .white
25
+ horizontalAlignment: Text .AlignHCenter
26
+ verticalAlignment: Text .AlignVCenter
27
+ }
28
+ background: Rectangle {
29
+ id: bg
30
+ color: root .bgColor
31
+ radius: 2
32
+ }
33
+ states: [
34
+ State {
35
+ name: " MAIN"
36
+ PropertyChanges {
37
+ target: root
38
+ visible: false
39
+ }
40
+ },
41
+ State {
42
+ name: " TEST"
43
+ PropertyChanges {
44
+ target: root
45
+ visible: true
46
+ text: qsTr (" Test Network" )
47
+ bgColor: Theme .color .green
48
+ }
49
+ },
50
+ State {
51
+ name: " SIGNET"
52
+ PropertyChanges {
53
+ target: root
54
+ visible: true
55
+ text: qsTr (" Signet Network" )
56
+ bgColor: Theme .color .amber
57
+ }
58
+ },
59
+ State {
60
+ name: " REGTEST"
61
+ PropertyChanges {
62
+ target: root
63
+ visible: true
64
+ text: qsTr (" Regtest Mode" )
65
+ bgColor: Theme .color .blue
66
+ }
67
+ }
68
+ ]
69
+ }
You can’t perform that action at this time.
0 commit comments