Skip to content

Commit 26801a3

Browse files
committed
Merge #290: Make entire peers page scrollable
478d59a qml: add page title to peers page & update description (jarolrod) 1bdd8cf qml: make entire peers page scrollable (jarolrod) Pull request description: Makes the entire peers page scrollable by moving in the top elements of the page into the header property of the ListView itself. | master | pr | | ------ | -- | | <img width="708" alt="Screen Shot 2023-03-15 at 3 45 03 AM" src="https://user-images.githubusercontent.com/23396902/225241131-239b3189-c9cc-4a32-afb4-c80e48b0be8d.png"> |<img width="752" alt="Screen Shot 2023-04-17 at 9 26 57 PM" src="https://user-images.githubusercontent.com/23396902/232649633-dfc3a34b-61bc-4c00-8984-a33af71228e5.png"> | [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/unsecure_win_gui.zip?branch=pull/290) [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/unsecure_mac_gui.zip?branch=pull/290) [![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/unsecure_mac_arm64_gui.zip?branch=pull/290) [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/unsecure_android_apk.zip?branch=pull/290) [![ARM32 Android](https://img.shields.io/badge/OS-Android%2032bit-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android32/unsecure_android_32bit_apk.zip?branch=pull/290) ACKs for top commit: johnny9: ACK 478d59a GBKS: ACK 478d59a Tree-SHA512: e1f0224b9bdbc2f5a46ba7df349d08595d6bb5c496da3a04d636c38b3609a8dfb9c967a0e50cc62f15c515eec8a099ad6029800e0c7268fb5787d627b30bdb77
2 parents d41dc18 + 478d59a commit 26801a3

File tree

2 files changed

+78
-73
lines changed

2 files changed

+78
-73
lines changed

src/qml/pages/node/NodeSettings.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ Item {
182182
peerTableModel.stopAutoRefresh();
183183
}
184184
}
185+
navMiddleDetail: Header {
186+
headerBold: true
187+
headerSize: 18
188+
header: qsTr("Peers")
189+
}
185190
}
186191
}
187192
Component {

src/qml/pages/node/Peers.qml

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -11,92 +11,92 @@ import "../../components"
1111
Page {
1212
background: null
1313
property alias navLeftDetail: navbar.leftDetail
14+
property alias navMiddleDetail: navbar.middleDetail
1415

1516
header: NavigationBar {
1617
id: navbar
1718
}
1819

19-
CoreText {
20-
anchors.top: parent.top
21-
anchors.horizontalCenter: parent.horizontalCenter
22-
id: description
23-
width: Math.min(parent.width - 40, 450)
24-
text: qsTr("Peers are nodes you are connected to. You want to ensure that you are connected" +
25-
" to x, y and z, but not a, b, and c. Learn more.")
26-
font.pixelSize: 13
27-
color: Theme.color.neutral7
28-
}
29-
30-
Flickable {
31-
id: sortSelection
32-
anchors.top: description.bottom
33-
anchors.topMargin: 20
34-
anchors.horizontalCenter: parent.horizontalCenter
35-
width: Math.min(parent.width - 40, toggleButtons.width)
36-
height: toggleButtons.height
37-
contentWidth: toggleButtons.width
38-
boundsMovement: width == toggleButtons.width ?
39-
Flickable.StopAtBounds : Flickable.FollowBoundsBehavior
40-
RowLayout {
41-
id: toggleButtons
42-
spacing: 10
43-
ToggleButton {
44-
text: qsTr("ID")
45-
autoExclusive: true
46-
checked: true
47-
onClicked: {
48-
peerListModelProxy.sortBy = "nodeId"
49-
}
50-
}
51-
ToggleButton {
52-
text: qsTr("Direction")
53-
autoExclusive: true
54-
onClicked: {
55-
peerListModelProxy.sortBy = "direction"
56-
}
57-
}
58-
ToggleButton {
59-
text: qsTr("User Agent")
60-
autoExclusive: true
61-
onClicked: {
62-
peerListModelProxy.sortBy = "subversion"
63-
}
64-
}
65-
ToggleButton {
66-
text: qsTr("Type")
67-
autoExclusive: true
68-
onClicked: {
69-
peerListModelProxy.sortBy = "connectionType"
70-
}
71-
}
72-
ToggleButton {
73-
text: qsTr("Ip")
74-
autoExclusive: true
75-
onClicked: {
76-
peerListModelProxy.sortBy = "address"
77-
}
78-
}
79-
ToggleButton {
80-
text: qsTr("Network")
81-
autoExclusive: true
82-
onClicked: {
83-
peerListModelProxy.sortBy = "network"
84-
}
85-
}
86-
}
87-
}
88-
8920
ListView {
9021
id: listView
9122
clip: true
9223
width: Math.min(parent.width - 40, 450)
93-
anchors.top: sortSelection.bottom
94-
anchors.topMargin: 30
95-
anchors.bottom: parent.bottom
24+
height: parent.height
9625
anchors.horizontalCenter: parent.horizontalCenter
9726
model: peerListModelProxy
9827
spacing: 15
9928

29+
header: ColumnLayout {
30+
spacing: 20
31+
width: parent.width
32+
CoreText {
33+
id: description
34+
Layout.fillWidth: true
35+
Layout.alignment: Qt.AlignHCenter
36+
text: qsTr("Peers are nodes you exchange data with.")
37+
font.pixelSize: 13
38+
color: Theme.color.neutral7
39+
}
40+
41+
Flickable {
42+
id: sortSelection
43+
Layout.fillWidth: true
44+
Layout.bottomMargin: 30
45+
Layout.alignment: Qt.AlignHCenter
46+
height: toggleButtons.height
47+
contentWidth: toggleButtons.width
48+
boundsMovement: width == toggleButtons.width ?
49+
Flickable.StopAtBound : Flickable.FollowBoundsBehavior
50+
RowLayout {
51+
id: toggleButtons
52+
spacing: 10
53+
ToggleButton {
54+
text: qsTr("ID")
55+
autoExclusive: true
56+
checked: true
57+
onClicked: {
58+
peerListModelProxy.sortBy = "nodeId"
59+
}
60+
}
61+
ToggleButton {
62+
text: qsTr("Direction")
63+
autoExclusive: true
64+
onClicked: {
65+
peerListModelProxy.sortBy = "direction"
66+
}
67+
}
68+
ToggleButton {
69+
text: qsTr("User Agent")
70+
autoExclusive: true
71+
onClicked: {
72+
peerListModelProxy.sortBy = "subversion"
73+
}
74+
}
75+
ToggleButton {
76+
text: qsTr("Type")
77+
autoExclusive: true
78+
onClicked: {
79+
peerListModelProxy.sortBy = "connectionType"
80+
}
81+
}
82+
ToggleButton {
83+
text: qsTr("Ip")
84+
autoExclusive: true
85+
onClicked: {
86+
peerListModelProxy.sortBy = "address"
87+
}
88+
}
89+
ToggleButton {
90+
text: qsTr("Network")
91+
autoExclusive: true
92+
onClicked: {
93+
peerListModelProxy.sortBy = "network"
94+
}
95+
}
96+
}
97+
}
98+
}
99+
100100
footer: Loader {
101101
height: 75
102102
active: nodeModel.numOutboundPeers < nodeModel.maxNumOutboundPeers

0 commit comments

Comments
 (0)