File tree Expand file tree Collapse file tree 12 files changed +172
-108
lines changed Expand file tree Collapse file tree 12 files changed +172
-108
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,7 @@ QML_RES_QML = \
367
367
qml/controls/NavButton.qml \
368
368
qml/controls/PageIndicator.qml \
369
369
qml/controls/NavigationBar.qml \
370
+ qml/controls/NavigationBar2.qml \
370
371
qml/controls/OptionButton.qml \
371
372
qml/controls/OptionSwitch.qml \
372
373
qml/controls/OutlineButton.qml \
Original file line number Diff line number Diff line change 28
28
<file>controls/NavButton.qml</file>
29
29
<file>controls/PageIndicator.qml</file>
30
30
<file>controls/NavigationBar.qml</file>
31
+ <file>controls/NavigationBar2.qml</file>
31
32
<file>controls/OptionButton.qml</file>
32
33
<file>controls/OptionSwitch.qml</file>
33
34
<file>controls/OutlineButton.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 QtQuick.Layouts 1.15
8
+
9
+ Pane {
10
+ property alias leftItem: left_section .contentItem
11
+ property alias centerItem: center_section .contentItem
12
+ property alias rightItem: right_section .contentItem
13
+
14
+ background: null
15
+ padding: 4
16
+ contentItem: RowLayout {
17
+ Div {
18
+ id: left_div
19
+ Layout .preferredWidth : Math .floor (Math .max (left_div .implicitWidth , right_div .implicitWidth ))
20
+ contentItem: RowLayout {
21
+ Section {
22
+ id: left_section
23
+ }
24
+ Spacer {
25
+ }
26
+ }
27
+ }
28
+ Section {
29
+ id: center_section
30
+ }
31
+ Div {
32
+ id: right_div
33
+ Layout .preferredWidth : Math .floor (Math .max (left_div .implicitWidth , right_div .implicitWidth ))
34
+ contentItem: RowLayout {
35
+ Spacer {
36
+ }
37
+ Section {
38
+ id: right_section
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ component Div: Pane {
45
+ Layout .alignment : Qt .AlignCenter
46
+ Layout .fillWidth : true
47
+ Layout .minimumWidth : implicitWidth
48
+ background: null
49
+ padding: 0
50
+ }
51
+
52
+ component Section: Pane {
53
+ Layout .alignment : Qt .AlignCenter
54
+ Layout .minimumWidth : implicitWidth
55
+ background: null
56
+ padding: 0
57
+ }
58
+
59
+ component Spacer: Item {
60
+ Layout .alignment : Qt .AlignCenter
61
+ Layout .fillWidth : true
62
+ height: 1
63
+ }
64
+ }
Original file line number Diff line number Diff line change @@ -82,22 +82,13 @@ ApplicationWindow {
82
82
interactive: false
83
83
orientation: Qt .Vertical
84
84
NodeRunner {
85
- navRightDetail: NavButton {
86
- iconSource: " image://images/gear"
87
- iconHeight: 24
88
- iconWidth: 24
89
- onClicked: node_swipe .incrementCurrentIndex ()
85
+ onSettingsClicked: {
86
+ node_swipe .incrementCurrentIndex ()
90
87
}
91
88
}
92
89
NodeSettings {
93
- navMiddleDetail: Header {
94
- headerBold: true
95
- headerSize: 18
96
- header: " Settings"
97
- }
98
- navRightDetail: NavButton {
99
- text: qsTr (" Done" )
100
- onClicked: node_swipe .decrementCurrentIndex ()
90
+ onDoneClicked: {
91
+ node_swipe .decrementCurrentIndex ()
101
92
}
102
93
}
103
94
}
Original file line number Diff line number Diff line change @@ -9,11 +9,17 @@ import "../../controls"
9
9
import "../../components"
10
10
11
11
Page {
12
+ signal settingsClicked
13
+ id: root
12
14
background: null
13
15
clip: true
14
- property alias navRightDetail: navbar .rightDetail
15
- header: NavigationBar {
16
- id: navbar
16
+ header: NavigationBar2 {
17
+ rightItem: NavButton {
18
+ iconSource: " image://images/gear"
19
+ iconHeight: 24
20
+ iconWidth: 24
21
+ onClicked: root .settingsClicked ()
22
+ }
17
23
}
18
24
19
25
Component .onCompleted : nodeModel .startNodeInitializionThread ();
Original file line number Diff line number Diff line change @@ -10,28 +10,32 @@ import "../../components"
10
10
import "../settings"
11
11
12
12
Item {
13
- id : nodeSettings
14
- property alias navMiddleDetail : nodeSettingsView . navMiddleDetail
15
- property alias navRightDetail : nodeSettingsView . navRightDetail
13
+ signal doneClicked
14
+
15
+ id : root
16
16
17
17
StackView {
18
18
id: nodeSettingsView
19
- property alias navMiddleDetail: node_settings .navMiddleDetail
20
- property alias navRightDetail: node_settings .navRightDetail
21
19
anchors .fill : parent
22
20
23
21
initialItem: Page {
24
22
id: node_settings
25
- property alias navMiddleDetail: navbar .middleDetail
26
- property alias navRightDetail: navbar .rightDetail
27
23
background: null
28
24
implicitWidth: 450
29
25
leftPadding: 20
30
26
rightPadding: 20
31
27
topPadding: 30
32
28
33
- header: NavigationBar {
34
- id: navbar
29
+ header: NavigationBar2 {
30
+ centerItem: Header {
31
+ headerBold: true
32
+ headerSize: 18
33
+ header: " Settings"
34
+ }
35
+ rightItem: NavButton {
36
+ text: qsTr (" Done" )
37
+ onClicked: root .doneClicked ()
38
+ }
35
39
}
36
40
ColumnLayout {
37
41
spacing: 4
@@ -138,17 +142,8 @@ Item {
138
142
Component {
139
143
id: display_page
140
144
SettingsDisplay {
141
- navLeftDetail: NavButton {
142
- iconSource: " image://images/caret-left"
143
- text: qsTr (" Back" )
144
- onClicked: {
145
- nodeSettingsView .pop ()
146
- }
147
- }
148
- navMiddleDetail: Header {
149
- headerBold: true
150
- headerSize: 18
151
- header: qsTr (" Display settings" )
145
+ onBackClicked: {
146
+ nodeSettingsView .pop ()
152
147
}
153
148
}
154
149
}
@@ -191,18 +186,9 @@ Item {
191
186
Component {
192
187
id: peers_page
193
188
Peers {
194
- navLeftDetail: NavButton {
195
- iconSource: " image://images/caret-left"
196
- text: qsTr (" Back" )
197
- onClicked: {
198
- nodeSettingsView .pop ()
199
- peerTableModel .stopAutoRefresh ();
200
- }
201
- }
202
- navMiddleDetail: Header {
203
- headerBold: true
204
- headerSize: 18
205
- header: qsTr (" Peers" )
189
+ onBackClicked: {
190
+ nodeSettingsView .pop ()
191
+ peerTableModel .stopAutoRefresh ();
206
192
}
207
193
}
208
194
}
Original file line number Diff line number Diff line change @@ -9,12 +9,22 @@ import "../../controls"
9
9
import "../../components"
10
10
11
11
Page {
12
+ signal backClicked
13
+
14
+ id: root
12
15
background: null
13
- property alias navLeftDetail: navbar .leftDetail
14
- property alias navMiddleDetail: navbar .middleDetail
15
16
16
- header: NavigationBar {
17
- id: navbar
17
+ header: NavigationBar2 {
18
+ leftItem: NavButton {
19
+ iconSource: " image://images/caret-left"
20
+ text: qsTr (" Back" )
21
+ onClicked: root .backClicked ()
22
+ }
23
+ centerItem: Header {
24
+ headerBold: true
25
+ headerSize: 18
26
+ header: qsTr (" Peers" )
27
+ }
18
28
}
19
29
20
30
ListView {
Original file line number Diff line number Diff line change @@ -9,17 +9,26 @@ import "../../controls"
9
9
import "../../components"
10
10
11
11
Page {
12
- property alias navLeftDetail: navbar .leftDetail
13
- property alias navMiddleDetail: navbar .middleDetail
12
+ signal backClicked
14
13
14
+ id: root
15
15
background: null
16
16
implicitWidth: 450
17
17
leftPadding: 20
18
18
rightPadding: 20
19
19
topPadding: 30
20
20
21
- header: NavigationBar {
22
- id: navbar
21
+ header: NavigationBar2 {
22
+ leftItem: NavButton {
23
+ iconSource: " image://images/caret-left"
24
+ text: qsTr (" Back" )
25
+ onClicked: root .backClicked ()
26
+ }
27
+ centerItem: Header {
28
+ headerBold: true
29
+ headerSize: 18
30
+ header: qsTr (" Block clock display mode" )
31
+ }
23
32
}
24
33
BlockClockDisplayMode {
25
34
width: Math .min (parent .width , 450 )
Original file line number Diff line number Diff line change @@ -34,17 +34,8 @@ Item {
34
34
detailItem: ConnectionSettings {}
35
35
}
36
36
SettingsProxy {
37
- navLeftDetail: NavButton {
38
- iconSource: " image://images/caret-left"
39
- text: qsTr (" Back" )
40
- onClicked: {
41
- connectionSwipe .decrementCurrentIndex ()
42
- }
43
- }
44
- navMiddleDetail: Header {
45
- headerBold: true
46
- headerSize: 18
47
- header: qsTr (" Proxy Settings" )
37
+ onBackClicked: {
38
+ connectionSwipe .decrementCurrentIndex ()
48
39
}
49
40
}
50
41
}
Original file line number Diff line number Diff line change @@ -9,28 +9,33 @@ import "../../controls"
9
9
import "../../components"
10
10
11
11
Item {
12
- property alias navLeftDetail: displaySettingsView .navLeftDetail
13
- property alias navMiddleDetail: displaySettingsView .navMiddleDetail
12
+ signal backClicked
13
+
14
+ id: root
15
+
14
16
StackView {
15
17
id: displaySettingsView
16
- property alias navLeftDetail: displaySettings .navLeftDetail
17
- property alias navMiddleDetail: displaySettings .navMiddleDetail
18
- property bool newcompilebool: false
19
18
anchors .fill : parent
20
19
21
-
22
20
initialItem: Page {
23
21
id: displaySettings
24
- property alias navLeftDetail: navbar .leftDetail
25
- property alias navMiddleDetail: navbar .middleDetail
26
22
background: null
27
23
implicitWidth: 450
28
24
leftPadding: 20
29
25
rightPadding: 20
30
26
topPadding: 30
31
27
32
- header: NavigationBar {
33
- id: navbar
28
+ header: NavigationBar2 {
29
+ leftItem: NavButton {
30
+ iconSource: " image://images/caret-left"
31
+ text: qsTr (" Back" )
32
+ onClicked: root .backClicked ()
33
+ }
34
+ centerItem: Header {
35
+ headerBold: true
36
+ headerSize: 18
37
+ header: qsTr (" Display settings" )
38
+ }
34
39
}
35
40
ColumnLayout {
36
41
spacing: 4
@@ -65,34 +70,16 @@ Item {
65
70
Component {
66
71
id: theme_page
67
72
SettingsTheme {
68
- navLeftDetail: NavButton {
69
- iconSource: " image://images/caret-left"
70
- text: qsTr (" Back" )
71
- onClicked: {
72
- nodeSettingsView .pop ()
73
- }
74
- }
75
- navMiddleDetail: Header {
76
- headerBold: true
77
- headerSize: 18
78
- header: qsTr (" Theme" )
73
+ onBackClicked: {
74
+ nodeSettingsView .pop ()
79
75
}
80
76
}
81
77
}
82
78
Component {
83
79
id: blockclocksize_page
84
80
SettingsBlockClockDisplayMode {
85
- navLeftDetail: NavButton {
86
- iconSource: " image://images/caret-left"
87
- text: qsTr (" Back" )
88
- onClicked: {
89
- nodeSettingsView .pop ()
90
- }
91
- }
92
- navMiddleDetail: Header {
93
- headerBold: true
94
- headerSize: 18
95
- header: qsTr (" Block clock display mode" )
81
+ onBackClicked: {
82
+ nodeSettingsView .pop ()
96
83
}
97
84
}
98
85
}
You can’t perform that action at this time.
0 commit comments