Skip to content

Commit fd0979d

Browse files
committed
Merge #356: CaretRightIcon control
74d4a97 qml: rename to CaretRightIcon (João Barbosa) 0fa582d qml: disable CaretRightButton (João Barbosa) Pull request description: Replace `CaretRightButton` with a more appropriate `CaretRightIcon`, and refactor the `clicked` signed. This also is a step towards removing the `loadedItem` property from `Setting`. ACKs for top commit: jarolrod: ACK 74d4a97 Tree-SHA512: 59991b6d0a3a851b09cda542b9fc5db70a2da71cbae68e9f090b48c3598d445bf6ff80f25a37144d00dbefca21395a0a9ee73150adb9cad11199499a254ef4dd
2 parents abd3ba1 + 74d4a97 commit fd0979d

File tree

7 files changed

+50
-64
lines changed

7 files changed

+50
-64
lines changed

src/Makefile.qt.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ QML_RES_QML = \
343343
qml/components/BlockClock.qml \
344344
qml/components/BlockClockDisplayMode.qml \
345345
qml/components/BlockCounter.qml \
346-
qml/components/CaretRightButton.qml \
346+
qml/controls/CaretRightIcon.qml \
347347
qml/components/ConnectionOptions.qml \
348348
qml/components/ConnectionSettings.qml \
349349
qml/components/DeveloperOptions.qml \

src/qml/bitcoin_qml.qrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<file>components/BlockClock.qml</file>
55
<file>components/BlockClockDisplayMode.qml</file>
66
<file>components/BlockCounter.qml</file>
7-
<file>components/CaretRightButton.qml</file>
7+
<file>controls/CaretRightIcon.qml</file>
88
<file>components/ConnectionOptions.qml</file>
99
<file>components/ConnectionSettings.qml</file>
1010
<file>components/PeersIndicator.qml</file>

src/qml/components/AboutOptions.qml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,11 @@ ColumnLayout {
6565
Layout.fillWidth: true
6666
header: qsTr("Developer options")
6767
description: qsTr("Only use these if you have development experience")
68-
actionItem: CaretRightButton{
69-
stateColor: gotoDeveloper.stateColor
70-
onClicked: {
71-
aboutSwipe.incrementCurrentIndex()
72-
}
68+
actionItem: CaretRightIcon {
69+
color: gotoDeveloper.stateColor
70+
}
71+
onClicked: {
72+
aboutSwipe.incrementCurrentIndex()
7373
}
74-
onClicked: loadedItem.clicked()
7574
}
7675
}

src/qml/components/ConnectionSettings.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ ColumnLayout {
6666
id: gotoProxy
6767
Layout.fillWidth: true
6868
header: qsTr("Proxy settings")
69-
actionItem: CaretRightButton {
70-
stateColor: gotoProxy.stateColor
69+
actionItem: CaretRightIcon {
70+
color: gotoProxy.stateColor
7171
}
7272
onClicked: connectionSwipe.incrementCurrentIndex()
7373
}

src/qml/components/CaretRightButton.qml renamed to src/qml/controls/CaretRightIcon.qml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@
44

55
import QtQuick 2.15
66
import QtQuick.Controls 2.15
7-
import "../controls"
87

98
Icon {
10-
id: root
11-
required property color stateColor
12-
enabled: true
139
source: "image://images/caret-right"
14-
color: root.stateColor
1510
size: 18
1611
}

src/qml/pages/node/NodeSettings.qml

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -41,79 +41,73 @@ Item {
4141
id: gotoAbout
4242
Layout.fillWidth: true
4343
header: qsTr("About")
44-
actionItem: CaretRightButton {
45-
stateColor: gotoAbout.stateColor
46-
onClicked: {
47-
nodeSettingsView.push(about_page)
48-
}
44+
actionItem: CaretRightIcon {
45+
color: gotoAbout.stateColor
46+
}
47+
onClicked: {
48+
nodeSettingsView.push(about_page)
4949
}
50-
onClicked: loadedItem.clicked()
5150
}
5251
Separator { Layout.fillWidth: true }
5352
Setting {
5453
id: gotoDisplay
5554
Layout.fillWidth: true
5655
header: qsTr("Display")
57-
actionItem: CaretRightButton {
58-
stateColor: gotoDisplay.stateColor
59-
onClicked: {
60-
nodeSettingsView.push(display_page)
61-
}
56+
actionItem: CaretRightIcon {
57+
color: gotoDisplay.stateColor
58+
}
59+
onClicked: {
60+
nodeSettingsView.push(display_page)
6261
}
63-
onClicked: loadedItem.clicked()
6462
}
6563
Separator { Layout.fillWidth: true }
6664
Setting {
6765
id: gotoStorage
6866
Layout.fillWidth: true
6967
header: qsTr("Storage")
70-
actionItem: CaretRightButton {
71-
stateColor: gotoStorage.stateColor
72-
onClicked: {
73-
nodeSettingsView.push(storage_page)
74-
}
68+
actionItem: CaretRightIcon {
69+
color: gotoStorage.stateColor
70+
}
71+
onClicked: {
72+
nodeSettingsView.push(storage_page)
7573
}
76-
onClicked: loadedItem.clicked()
7774
}
7875
Separator { Layout.fillWidth: true }
7976
Setting {
8077
id: gotoConnection
8178
Layout.fillWidth: true
8279
header: qsTr("Connection")
83-
actionItem: CaretRightButton {
84-
stateColor: gotoConnection.stateColor
85-
onClicked: {
86-
nodeSettingsView.push(connection_page)
87-
}
80+
actionItem: CaretRightIcon {
81+
color: gotoConnection.stateColor
82+
}
83+
onClicked: {
84+
nodeSettingsView.push(connection_page)
8885
}
89-
onClicked: loadedItem.clicked()
9086
}
9187
Separator { Layout.fillWidth: true }
9288
Setting {
9389
id: gotoPeers
9490
Layout.fillWidth: true
9591
header: qsTr("Peers")
96-
actionItem: CaretRightButton {
97-
stateColor: gotoPeers.stateColor
98-
onClicked: {
99-
peerTableModel.startAutoRefresh();
100-
nodeSettingsView.push(peers_page)
101-
}
92+
actionItem: CaretRightIcon {
93+
color: gotoPeers.stateColor
94+
}
95+
onClicked: {
96+
peerTableModel.startAutoRefresh();
97+
nodeSettingsView.push(peers_page)
10298
}
103-
onClicked: loadedItem.clicked()
10499
}
105100
Separator { Layout.fillWidth: true }
106101
Setting {
107102
id: gotoNetworkTraffic
108103
Layout.fillWidth: true
109104
header: qsTr("Network Traffic")
110-
actionItem: CaretRightButton {
111-
stateColor: gotoNetworkTraffic.stateColor
112-
onClicked: {
113-
nodeSettingsView.push(networktraffic_page)
114-
}
105+
actionItem: CaretRightIcon {
106+
color: gotoNetworkTraffic.stateColor
107+
}
108+
onClicked: {
109+
nodeSettingsView.push(networktraffic_page)
115110
}
116-
onClicked: loadedItem.clicked()
117111
}
118112
}
119113
}

src/qml/pages/settings/SettingsDisplay.qml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,24 @@ Item {
4040
id: gotoTheme
4141
Layout.fillWidth: true
4242
header: qsTr("Theme")
43-
actionItem: CaretRightButton {
44-
stateColor: gotoTheme.stateColor
45-
onClicked: {
46-
nodeSettingsView.push(theme_page)
47-
}
43+
actionItem: CaretRightIcon {
44+
color: gotoTheme.stateColor
45+
}
46+
onClicked: {
47+
nodeSettingsView.push(theme_page)
4848
}
49-
onClicked: loadedItem.clicked()
5049
}
5150
Separator { Layout.fillWidth: true }
5251
Setting {
5352
id: gotoBlockClockSize
5453
Layout.fillWidth: true
5554
header: qsTr("Block clock display mode")
56-
actionItem: CaretRightButton {
57-
stateColor: gotoBlockClockSize.stateColor
58-
onClicked: {
59-
nodeSettingsView.push(blockclocksize_page)
60-
}
55+
actionItem: CaretRightIcon {
56+
color: gotoBlockClockSize.stateColor
57+
}
58+
onClicked: {
59+
nodeSettingsView.push(blockclocksize_page)
6160
}
62-
onClicked: loadedItem.clicked()
6361
}
6462
}
6563
}

0 commit comments

Comments
 (0)