@@ -12,9 +12,11 @@ import "../controls"
12
12
13
13
Item {
14
14
id: root
15
+ property real parentWidth: 600
16
+ property real parentHeight: 600
15
17
16
- implicitWidth : 200
17
- implicitHeight : 200 + networkIndicator .height + networkIndicator .anchors .topMargin
18
+ width : dial . width
19
+ height : dial . height + networkIndicator .height + networkIndicator .anchors .topMargin
18
20
19
21
property alias header: mainText .text
20
22
property alias headerSize: mainText .font .pixelSize
@@ -28,8 +30,10 @@ Item {
28
30
29
31
BlockClockDial {
30
32
id: dial
31
- width: 200
32
- height: 200
33
+ anchors .horizontalCenter : root .horizontalCenter
34
+ width: Math .min ((root .parentWidth * (5 / 12 )), (root .parentHeight * (5 / 12 )))
35
+ height: dial .width
36
+ penWidth: dial .width / 50
33
37
timeRatioList: chainModel .timeRatioList
34
38
verificationProgress: nodeModel .verificationProgress
35
39
paused: root .paused
57
61
background: null
58
62
icon .source : " image://images/bitcoin-circle"
59
63
icon .color : Theme .color .neutral9
60
- icon .width : 40
61
- icon .height : 40
64
+ icon .width : Math . max ( dial . width / 5 , 1 )
65
+ icon .height : Math . max ( dial . width / 5 , 1 )
62
66
anchors .bottom : mainText .top
63
67
anchors .horizontalCenter : root .horizontalCenter
64
68
72
76
anchors .centerIn : dial
73
77
font .family : " Inter"
74
78
font .styleName : " Semi Bold"
75
- font .pixelSize : 32
79
+ font .pixelSize : dial . width * ( 4 / 25 )
76
80
color: Theme .color .neutral9
77
81
78
82
Behavior on color {
86
90
anchors .horizontalCenter : root .horizontalCenter
87
91
font .family : " Inter"
88
92
font .styleName : " Semi Bold"
89
- font .pixelSize : 18
93
+ font .pixelSize : dial . width * ( 9 / 100 )
90
94
color: Theme .color .neutral4
91
95
92
96
Behavior on color {
@@ -96,10 +100,12 @@ Item {
96
100
97
101
PeersIndicator {
98
102
anchors .top : subText .bottom
99
- anchors .topMargin : 20
103
+ anchors .topMargin : dial . width / 10
100
104
anchors .horizontalCenter : root .horizontalCenter
101
105
numOutboundPeers: nodeModel .numOutboundPeers
102
106
maxNumOutboundPeers: nodeModel .maxNumOutboundPeers
107
+ indicatorDimensions: dial .width * (3 / 200 )
108
+ indicatorSpacing: dial .width / 40
103
109
paused: root .paused
104
110
}
105
111
@@ -146,16 +152,16 @@ Item {
146
152
PropertyChanges {
147
153
target: root
148
154
header: " Paused"
149
- headerSize: 24
155
+ headerSize: dial . width * ( 3 / 25 )
150
156
subText: " Tap to resume"
151
157
}
152
158
PropertyChanges {
153
159
target: bitcoinIcon
154
- anchors .bottomMargin : 5
160
+ anchors .bottomMargin : dial . width / 40
155
161
}
156
162
PropertyChanges {
157
163
target: subText
158
- anchors .topMargin : 4
164
+ anchors .topMargin : dial . width / 50
159
165
}
160
166
},
161
167
@@ -164,16 +170,16 @@ Item {
164
170
PropertyChanges {
165
171
target: root
166
172
header: " Connecting"
167
- headerSize: 24
173
+ headerSize: dial . width * ( 3 / 25 )
168
174
subText: " Please wait"
169
175
}
170
176
PropertyChanges {
171
177
target: bitcoinIcon
172
- anchors .bottomMargin : 5
178
+ anchors .bottomMargin : dial . width / 40
173
179
}
174
180
PropertyChanges {
175
181
target: subText
176
- anchors .topMargin : 4
182
+ anchors .topMargin : dial . width / 50
177
183
}
178
184
}
179
185
]
0 commit comments