Skip to content

Commit ce74617

Browse files
committed
2 parents f578d8f + 1eec3d8 commit ce74617

File tree

1 file changed

+48
-40
lines changed

1 file changed

+48
-40
lines changed

src/qml/pages/node/Peers.qml

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -21,59 +21,67 @@ Page {
2121
anchors.horizontalCenter: parent.horizontalCenter
2222
id: description
2323
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 to x, y and z, but not a, b, and c. Learn more.")
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.")
2526
font.pixelSize: 13
2627
color: Theme.color.neutral7
2728
}
2829

29-
Flow {
30+
Flickable {
3031
id: sortSelection
3132
anchors.top: description.bottom
3233
anchors.topMargin: 20
3334
anchors.horizontalCenter: parent.horizontalCenter
34-
width: Math.min(parent.width - 40, 450)
35-
spacing: 10
36-
ToggleButton {
37-
text: qsTr("ID")
38-
autoExclusive: true
39-
checked: true
40-
onClicked: {
41-
peerListModelProxy.sortBy = "nodeId"
35+
width: Math.min(parent.width - 40, toggleButtons.width)
36+
height: toggleButtons.height
37+
contentWidth: toggleButtons.width
38+
boundsMovement: width == toggleButtons.width ?
39+
Flickable.StopAtBound : 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+
}
4250
}
43-
}
44-
ToggleButton {
45-
text: qsTr("Direction")
46-
autoExclusive: true
47-
onClicked: {
48-
peerListModelProxy.sortBy = "direction"
51+
ToggleButton {
52+
text: qsTr("Direction")
53+
autoExclusive: true
54+
onClicked: {
55+
peerListModelProxy.sortBy = "direction"
56+
}
4957
}
50-
}
51-
ToggleButton {
52-
text: qsTr("User Agent")
53-
autoExclusive: true
54-
onClicked: {
55-
peerListModelProxy.sortBy = "subversion"
58+
ToggleButton {
59+
text: qsTr("User Agent")
60+
autoExclusive: true
61+
onClicked: {
62+
peerListModelProxy.sortBy = "subversion"
63+
}
5664
}
57-
}
58-
ToggleButton {
59-
text: qsTr("Type")
60-
autoExclusive: true
61-
onClicked: {
62-
peerListModelProxy.sortBy = "connectionType"
65+
ToggleButton {
66+
text: qsTr("Type")
67+
autoExclusive: true
68+
onClicked: {
69+
peerListModelProxy.sortBy = "connectionType"
70+
}
6371
}
64-
}
65-
ToggleButton {
66-
text: qsTr("Ip")
67-
autoExclusive: true
68-
onClicked: {
69-
peerListModelProxy.sortBy = "address"
72+
ToggleButton {
73+
text: qsTr("Ip")
74+
autoExclusive: true
75+
onClicked: {
76+
peerListModelProxy.sortBy = "address"
77+
}
7078
}
71-
}
72-
ToggleButton {
73-
text: qsTr("Network")
74-
autoExclusive: true
75-
onClicked: {
76-
peerListModelProxy.sortBy = "network"
79+
ToggleButton {
80+
text: qsTr("Network")
81+
autoExclusive: true
82+
onClicked: {
83+
peerListModelProxy.sortBy = "network"
84+
}
7785
}
7886
}
7987
}

0 commit comments

Comments
 (0)