@@ -11,92 +11,92 @@ import "../../components"
11
11
Page {
12
12
background: null
13
13
property alias navLeftDetail: navbar .leftDetail
14
+ property alias navMiddleDetail: navbar .middleDetail
14
15
15
16
header: NavigationBar {
16
17
id: navbar
17
18
}
18
19
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
-
89
20
ListView {
90
21
id: listView
91
22
clip: true
92
23
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
96
25
anchors .horizontalCenter : parent .horizontalCenter
97
26
model: peerListModelProxy
98
27
spacing: 15
99
28
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
+
100
100
footer: Loader {
101
101
height: 75
102
102
active: nodeModel .numOutboundPeers < nodeModel .maxNumOutboundPeers
0 commit comments