@@ -230,25 +230,30 @@ ToolIndicatorPage {
230
230
spacing: ScreenTools .defaultFontPixelHeight * 0.1
231
231
Layout .bottomMargin : index < Math .min (4 , _allMotors .length ) - 1 ? ScreenTools .defaultFontPixelHeight * 0.5 : 0
232
232
233
+ // Option 1: Compact status with colored circle
233
234
RowLayout {
235
+ spacing: ScreenTools .defaultFontPixelWidth * 0.5
234
236
235
237
QGCLabel {
236
238
text: qsTr (" Motor %1" ).arg (_allMotors[index].id )
237
239
color: qgcPal .text
238
240
}
241
+
242
+ // Small colored circle indicator
243
+ Rectangle {
244
+ width: ScreenTools .defaultFontPixelHeight * 0.6
245
+ height: ScreenTools .defaultFontPixelHeight * 0.6
246
+ radius: width / 2
247
+ color: _allMotors[index].healthy ? qgcPal .colorGreen : qgcPal .colorRed
248
+ }
249
+
239
250
QGCLabel {
240
251
text: _allMotors[index].healthy ? qsTr (" ONLINE" ) : qsTr (" OFFLINE" )
241
252
color: _allMotors[index].healthy ? qgcPal .colorGreen : qgcPal .colorRed
253
+ font .pointSize : ScreenTools .smallFontPointSize
242
254
}
243
255
}
244
256
245
- // Rectangle {
246
- // Layout.fillWidth: true
247
- // height: ScreenTools.defaultFontPixelHeight * 0.15
248
- // color: _allMotors[index].healthy ? qgcPal.colorGreen : qgcPal.colorRed
249
- // radius: 2
250
- // }
251
-
252
257
GridLayout {
253
258
Layout .fillWidth : true
254
259
columns: 2
@@ -276,20 +281,18 @@ ToolIndicatorPage {
276
281
}
277
282
278
283
LabelledLabel {
279
- // Layout.fillWidth: true
280
284
label: qsTr (" Errors" )
281
285
labelText: _allMotors[index].errorCount .toString ()
282
286
}
283
287
284
288
// Empty cell
285
289
Item { }
286
-
287
290
}
288
291
}
289
292
}
290
293
}
291
294
292
- // Column 2 - Motors 5-8
295
+ // Column 2 - Motors 5-8 (consistent with Column 1)
293
296
ColumnLayout {
294
297
Layout .fillWidth : true
295
298
spacing: ScreenTools .defaultFontPixelHeight * 0.25
@@ -302,57 +305,62 @@ ToolIndicatorPage {
302
305
spacing: ScreenTools .defaultFontPixelHeight * 0.1
303
306
Layout .bottomMargin : index < Math .max (0 , _allMotors .length - 4 ) - 1 ? ScreenTools .defaultFontPixelHeight * 0.5 : 0
304
307
305
- QGCLabel {
306
- text: qsTr (" Motor %1" ).arg (_allMotors[index + 4 ].id )
307
- font .pointSize : ScreenTools .smallFontPointSize
308
- color: qgcPal .text
309
- }
308
+ // Consistent with Column 1
309
+ RowLayout {
310
+ spacing: ScreenTools .defaultFontPixelWidth * 0.5
310
311
311
- Rectangle {
312
- Layout .fillWidth : true
313
- height: ScreenTools .defaultFontPixelHeight * 0.15
314
- color: _allMotors[index + 4 ].healthy ? qgcPal .colorGreen : qgcPal .colorRed
315
- radius: 2
312
+ QGCLabel {
313
+ text: qsTr (" Motor %1" ).arg (_allMotors[index + 4 ].id )
314
+ color: qgcPal .text
315
+ }
316
+
317
+ Rectangle {
318
+ width: ScreenTools .defaultFontPixelHeight * 0.6
319
+ height: ScreenTools .defaultFontPixelHeight * 0.6
320
+ radius: width / 2
321
+ color: _allMotors[index + 4 ].healthy ? qgcPal .colorGreen : qgcPal .colorRed
322
+ }
323
+
324
+ QGCLabel {
325
+ text: _allMotors[index + 4 ].healthy ? qsTr (" ONLINE" ) : qsTr (" OFFLINE" )
326
+ color: _allMotors[index + 4 ].healthy ? qgcPal .colorGreen : qgcPal .colorRed
327
+ font .pointSize : ScreenTools .smallFontPointSize
328
+ }
316
329
}
317
330
318
331
GridLayout {
319
332
Layout .fillWidth : true
320
333
columns: 2
321
334
rowSpacing: 2
322
- columnSpacing: ScreenTools .defaultFontPixelWidth
335
+ columnSpacing: ScreenTools .defaultFontPixelWidth * 2
323
336
324
337
LabelledLabel {
325
- Layout .fillWidth : true
326
338
label: qsTr (" RPM" )
327
339
labelText: _allMotors[index + 4 ].rpm .toString ()
328
340
}
329
341
330
342
LabelledLabel {
331
- Layout .fillWidth : true
332
343
label: qsTr (" Current" )
333
344
labelText: _allMotors[index + 4 ].current .toFixed (1 ) + " A"
334
345
}
335
346
336
347
LabelledLabel {
337
- Layout .fillWidth : true
338
348
label: qsTr (" Voltage" )
339
349
labelText: _allMotors[index + 4 ].voltage .toFixed (1 ) + " V"
340
350
}
341
351
342
352
LabelledLabel {
343
- Layout .fillWidth : true
344
353
label: qsTr (" Temp" )
345
354
labelText: _allMotors[index + 4 ].temperature > 0 ? _allMotors[index + 4 ].temperature .toFixed (1 ) + " °C" : na
346
355
}
347
356
348
357
LabelledLabel {
349
- Layout .fillWidth : true
350
358
label: qsTr (" Errors" )
351
359
labelText: _allMotors[index + 4 ].errorCount .toString ()
352
360
}
353
361
354
362
// Empty cell
355
- Item { Layout . fillWidth : true }
363
+ Item { }
356
364
}
357
365
}
358
366
}
0 commit comments