Skip to content

Commit 29f26f8

Browse files
committed
Merge #263: Separate out Separator from Setting control
5cbf67f qml: use Separator component to separate settings (jarolrod) 09aa701 qml: introduce Separator component (jarolrod) Pull request description: This is required in order to properly support the feature attempted by #214 ### Master | About | Dev | Prune | Connection | Node | | ----- | --- | ----- | ---------- | ---- | | <img width="752" alt="about-master" src="https://user-images.githubusercontent.com/23396902/218625414-180b5a16-6a54-4c30-9f7f-6fd7ba667a6d.png"> |<img width="752" alt="dev-master" src="https://user-images.githubusercontent.com/23396902/218629878-7a1b1024-5b25-446e-9159-6160f0699a8a.png"> |<img width="752" alt="prune-master" src="https://user-images.githubusercontent.com/23396902/218629926-f61080f2-e20a-42f8-8f1c-7dac9ec494a9.png"> |<img width="752" alt="connection-master" src="https://user-images.githubusercontent.com/23396902/218629963-baebb34c-9615-435a-9f7c-24a1a88c8706.png"> |<img width="752" alt="node-master" src="https://user-images.githubusercontent.com/23396902/218629984-1d6a2b5e-d4a4-4baf-ba28-041f90214036.png"> | ### PR | About | Dev | Prune | Connection | Node | | ----- | --- | ----- | ---------- | ---- | | <img width="752" alt="about-pr" src="https://user-images.githubusercontent.com/23396902/218625012-4fb45c2c-4911-422d-a83c-471e64b05fd1.png"> |<img width="752" alt="dev-pr" src="https://user-images.githubusercontent.com/23396902/218625047-78e6ca4d-d900-4bf7-9f69-77c1a40e0920.png"> |<img width="752" alt="prune-pr" src="https://user-images.githubusercontent.com/23396902/218625067-a71ee530-60c9-4c6f-86eb-f3dccac4230e.png"> |<img width="752" alt="connection-pr" src="https://user-images.githubusercontent.com/23396902/218625084-3811d101-c67b-4f8a-89e7-fc19d58ae609.png"> |<img width="752" alt="node-pr" src="https://user-images.githubusercontent.com/23396902/218625114-ec06b0ec-e37c-403c-a9c5-68b919375cba.png"> | This also gets us in line with the design file in regards to the height of a setting | master | pr | design | | ------ | -- | ------ | | <img width="483" alt="Screen Shot 2023-02-13 at 7 30 58 PM" src="https://user-images.githubusercontent.com/23396902/218630233-cb861aad-9541-419a-9252-6fbbe697bad8.png"> | <img width="483" alt="Screen Shot 2023-02-13 at 7 21 49 PM" src="https://user-images.githubusercontent.com/23396902/218630255-e428a704-9b8c-41ee-a065-ebef73a9f75e.png"> | <img width="483" alt="Screen Shot 2023-02-13 at 7 31 54 PM" src="https://user-images.githubusercontent.com/23396902/218630286-6bb415a7-eca6-44d3-8d12-faf5dfe283b7.png"> | [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/263) [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/263) [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/263) [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/263) ACKs for top commit: johnny9: ACK 5cbf67f Tree-SHA512: 45bb90348b780b364a2165aac6f585b1428f60de276c866fe889385b3226726a44e4747b1f1768d62e94bc15343036089df29f209157cb67454cbcf26aece2f3
2 parents f96e63f + 5cbf67f commit 29f26f8

File tree

9 files changed

+49
-32
lines changed

9 files changed

+49
-32
lines changed

src/Makefile.qt.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ QML_RES_QML = \
336336
qml/components/DeveloperOptions.qml \
337337
qml/components/PeersIndicator.qml \
338338
qml/components/NetworkIndicator.qml \
339+
qml/components/Separator.qml \
339340
qml/components/StorageLocations.qml \
340341
qml/components/StorageOptions.qml \
341342
qml/components/StorageSettings.qml \

src/qml/bitcoin_qml.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<file>components/DeveloperOptions.qml</file>
1111
<file>components/NetworkIndicator.qml</file>
1212
<file>components/StorageLocations.qml</file>
13+
<file>components/Separator.qml</file>
1314
<file>components/StorageOptions.qml</file>
1415
<file>components/StorageSettings.qml</file>
1516
<file>controls/ContinueButton.qml</file>

src/qml/components/AboutOptions.qml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import QtQuick.Layouts 1.15
88
import "../controls"
99

1010
ColumnLayout {
11-
spacing: 20
11+
spacing: 4
1212
Setting {
1313
id: websiteLink
1414
Layout.fillWidth: true
@@ -20,6 +20,7 @@ ColumnLayout {
2020
}
2121
onClicked: loadedItem.clicked()
2222
}
23+
Separator { Layout.fillWidth: true }
2324
Setting {
2425
id: sourceLink
2526
Layout.fillWidth: true
@@ -31,6 +32,7 @@ ColumnLayout {
3132
}
3233
onClicked: loadedItem.clicked()
3334
}
35+
Separator { Layout.fillWidth: true }
3436
Setting {
3537
id: licenseLink
3638
Layout.fillWidth: true
@@ -42,6 +44,7 @@ ColumnLayout {
4244
}
4345
onClicked: loadedItem.clicked()
4446
}
47+
Separator { Layout.fillWidth: true }
4548
Setting {
4649
id: versionLink
4750
Layout.fillWidth: true
@@ -56,6 +59,7 @@ ColumnLayout {
5659
}
5760
onClicked: loadedItem.clicked()
5861
}
62+
Separator { Layout.fillWidth: true }
5963
Setting {
6064
id: gotoDeveloper
6165
Layout.fillWidth: true

src/qml/components/ConnectionSettings.qml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import QtQuick.Layouts 1.15
88
import "../controls"
99

1010
ColumnLayout {
11-
spacing: 20
11+
spacing: 4
1212
Setting {
1313
Layout.fillWidth: true
1414
header: qsTr("Enable listening")
@@ -22,6 +22,7 @@ ColumnLayout {
2222
loadedItem.toggled()
2323
}
2424
}
25+
Separator { Layout.fillWidth: true }
2526
Setting {
2627
Layout.fillWidth: true
2728
header: qsTr("Map port using UPnP")
@@ -34,6 +35,7 @@ ColumnLayout {
3435
loadedItem.toggled()
3536
}
3637
}
38+
Separator { Layout.fillWidth: true }
3739
Setting {
3840
Layout.fillWidth: true
3941
header: qsTr("Map port using NAT-PMP")
@@ -46,6 +48,7 @@ ColumnLayout {
4648
loadedItem.toggled()
4749
}
4850
}
51+
Separator { Layout.fillWidth: true }
4952
Setting {
5053
Layout.fillWidth: true
5154
header: qsTr("Enable RPC server")
@@ -58,6 +61,7 @@ ColumnLayout {
5861
loadedItem.toggled()
5962
}
6063
}
64+
Separator { Layout.fillWidth: true }
6165
Setting {
6266
id: gotoProxy
6367
last: true

src/qml/components/DeveloperOptions.qml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import QtQuick.Layouts 1.15
88
import "../controls"
99

1010
ColumnLayout {
11-
spacing: 20
11+
spacing: 4
1212
Setting {
1313
id: devDocsLink
1414
Layout.fillWidth: true
@@ -22,6 +22,7 @@ ColumnLayout {
2222
}
2323
onClicked: loadedItem.clicked()
2424
}
25+
Separator { Layout.fillWidth: true }
2526
Setting {
2627
id: dbcacheSetting
2728
Layout.fillWidth: true
@@ -33,6 +34,7 @@ ColumnLayout {
3334
}
3435
onClicked: loadedItem.forceActiveFocus()
3536
}
37+
Separator { Layout.fillWidth: true }
3638
Setting {
3739
id: parSetting
3840
Layout.fillWidth: true
@@ -44,6 +46,7 @@ ColumnLayout {
4446
}
4547
onClicked: loadedItem.forceActiveFocus()
4648
}
49+
Separator { Layout.fillWidth: true }
4750
Setting {
4851
Layout.fillWidth: true
4952
header: qsTr("Dark Mode")

src/qml/components/Separator.qml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
9+
Rectangle {
10+
height: 1
11+
color: Theme.color.neutral5
12+
}

src/qml/components/StorageSettings.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import QtQuick.Layouts 1.15
88
import "../controls"
99

1010
ColumnLayout {
11-
spacing: 20
11+
spacing: 4
1212
Setting {
1313
Layout.fillWidth: true
1414
header: qsTr("Store recent blocks only")
@@ -28,6 +28,7 @@ ColumnLayout {
2828
loadedItem.toggled()
2929
}
3030
}
31+
Separator { Layout.fillWidth: true }
3132
Setting {
3233
id: pruneTargetSetting
3334
Layout.fillWidth: true

src/qml/controls/Setting.qml

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -62,36 +62,24 @@ AbstractButton {
6262
}
6363
}
6464

65-
contentItem: ColumnLayout {
66-
spacing: 20
67-
width: parent.width
68-
RowLayout {
69-
Header {
70-
Layout.fillWidth: true
71-
center: false
72-
header: root.header
73-
headerSize: 18
74-
headerColor: root.stateColor
75-
description: root.description
76-
descriptionSize: 15
77-
descriptionMargin: 0
78-
}
79-
Loader {
80-
id: action_loader
81-
active: true
82-
visible: active
83-
sourceComponent: root.actionItem
84-
}
65+
contentItem: RowLayout {
66+
Header {
67+
Layout.topMargin: 14
68+
Layout.bottomMargin: 14
69+
Layout.fillWidth: true
70+
center: false
71+
header: root.header
72+
headerSize: 18
73+
headerColor: root.stateColor
74+
description: root.description
75+
descriptionSize: 15
76+
descriptionMargin: 0
8577
}
8678
Loader {
87-
Layout.fillWidth: true
88-
Layout.columnSpan: 2
89-
active: !last
79+
id: action_loader
80+
active: true
9081
visible: active
91-
sourceComponent: Rectangle {
92-
height: 1
93-
color: Theme.color.neutral5
94-
}
82+
sourceComponent: root.actionItem
9583
}
9684
}
9785
}

src/qml/pages/node/NodeSettings.qml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Item {
3434
id: navbar
3535
}
3636
ColumnLayout {
37-
spacing: 20
37+
spacing: 4
3838
width: Math.min(parent.width, 450)
3939
anchors.horizontalCenter: parent.horizontalCenter
4040
Setting {
@@ -46,6 +46,7 @@ Item {
4646
}
4747
onClicked: loadedItem.toggled()
4848
}
49+
Separator { Layout.fillWidth: true }
4950
Setting {
5051
id: gotoAbout
5152
Layout.fillWidth: true
@@ -58,6 +59,7 @@ Item {
5859
}
5960
onClicked: loadedItem.clicked()
6061
}
62+
Separator { Layout.fillWidth: true }
6163
Setting {
6264
id: gotoStorage
6365
Layout.fillWidth: true
@@ -70,6 +72,7 @@ Item {
7072
}
7173
onClicked: loadedItem.clicked()
7274
}
75+
Separator { Layout.fillWidth: true }
7376
Setting {
7477
id: gotoConnection
7578
Layout.fillWidth: true

0 commit comments

Comments
 (0)