@@ -63,30 +63,47 @@ Column {
63
63
Row {
64
64
visible: maximized
65
65
66
- Controls .Button {
67
- flat: true
68
- height: parent .height
69
- rightCropped: true
70
- enabled: typeof params .latitude !== " undefined" && typeof params .longitude !== " undefined"
71
- iconSource: controller .tracking ? " qrc:/icons/cancel_track.svg" : " qrc:/icons/track.svg"
72
- tipText: controller .tracking ? qsTr (" Cancel track" ) : qsTr (" Track" )
73
- onClicked: controller .setTracking (! controller .tracking )
66
+ Controls .ColoredIcon {
67
+ id: snsIcon
68
+ color: {
69
+ if (typeof params .gpsFix === " undefined" )
70
+ return Indicators .Theme .disabledColor ;
71
+
72
+ switch (params .gpsFix ) {
73
+ case - 1 :
74
+ case 0 : return Indicators .Theme .extremeRed ;
75
+ case 1 : return Indicators .Theme .severeOrange ;
76
+ case 2 : return Indicators .Theme .moderateYellow ;
77
+ case 3 :
78
+ default : return Indicators .Theme .textColor ;
79
+ }
80
+ }
81
+ source: " qrc:/icons/gps.svg"
82
+ height: Controls .Theme .baseSize
83
+ width: height
84
+
85
+ Text {
86
+ text: guardNaN (params .satellitesVisible )
87
+ font .pixelSize : parent .height / 4
88
+ font .bold : true
89
+ anchors .bottom : parent .bottom
90
+ anchors .right : parent .right
91
+ color: parent .color
92
+ }
74
93
}
75
94
76
- Column {
77
- Indicators .Text {
78
- color: params .latitude ? Indicators .Theme .textColor : Indicators .Theme .disabledColor
79
- text: qsTr (" Lat" ) + " :\t " +
80
- (params .latitude ? Controls .Helper .degreesToDmsString (params .latitude , false , 2 )
81
- : " -" )
82
- }
95
+ Coordinates {
96
+ id: coordinates
97
+ width: root .width - snsIcon .width - switchButton .width
98
+ }
83
99
84
- Indicators .Text {
85
- color: params .longitude ? Indicators .Theme .textColor : Indicators .Theme .disabledColor
86
- text: qsTr (" Lon" ) + " :\t " +
87
- (params .longitude ? Controls .Helper .degreesToDmsString (params .longitude , true , 2 )
88
- : " -" )
89
- }
100
+ Controls .Button {
101
+ id: switchButton
102
+ flat: true
103
+ leftCropped: true
104
+ iconSource: " qrc:/icons/swap.svg"
105
+ tipText: qsTr (" Switch coordinates presentation" )
106
+ onClicked: coordinates .dms = ! coordinates .dms
90
107
}
91
108
}
92
109
@@ -112,7 +129,11 @@ Column {
112
129
value: guardNaN (params .ias )
113
130
}
114
131
115
- Indicators .Text { width: parent .width ; text: qsTr (" m/s" ) }
132
+ Indicators .Text {
133
+ width: parent .width
134
+ font .pixelSize : Indicators .Theme .auxFontSize
135
+ text: qsTr (" m/s" )
136
+ }
116
137
}
117
138
118
139
Indicators .AttitudeIndicator {
@@ -162,7 +183,11 @@ Column {
162
183
value: guardNaN (params .altitudeRelative )
163
184
}
164
185
165
- Indicators .Text { width: parent .width ; text: qsTr (" m" ) }
186
+ Indicators .Text {
187
+ width: parent .width
188
+ font .pixelSize : Indicators .Theme .auxFontSize
189
+ text: qsTr (" m" )
190
+ }
166
191
}
167
192
}
168
193
@@ -188,7 +213,11 @@ Column {
188
213
value: compas .course
189
214
}
190
215
191
- Indicators .Text { width: parent .width ; text: " \u00B0 " }
216
+ Indicators .Text {
217
+ width: parent .width
218
+ font .pixelSize : Indicators .Theme .auxFontSize
219
+ text: " \u00B0 "
220
+ }
192
221
}
193
222
194
223
Indicators .Compass {
@@ -222,7 +251,11 @@ Column {
222
251
value: guardNaN (params .homeDistance )
223
252
}
224
253
225
- Indicators .Text { width: parent .width ; text: qsTr (" m" ) }
254
+ Indicators .Text {
255
+ width: parent .width
256
+ font .pixelSize : Indicators .Theme .auxFontSize
257
+ text: qsTr (" m" )
258
+ }
226
259
}
227
260
}
228
261
0 commit comments