One line of a readout: swatch, name, live value. More...
| Import Statement: | import Clayground.Lab |
The row three labs wrote out by hand - sensor-fusion's legend entries, LidarMonitor's rows, street-network's stats lines. Swatch on the left in the colour the thing wears everywhere else, elided name in the middle, value hard right in mono so a column of them lines up.
Use it inside a LabPanel, or let ReadoutPanel build a stack of them from data.
LabPanel { id: legend title: LabLang.t("legend.title") ReadoutRow { width: legend.body.width swatch: LabTheme.rose label: LabLang.t("sensor.gps") value: LabLang.qty(gps.sigma, "m", 1) } }
See also ReadoutPanel and LabPanel.
bar : real |
0..1 - draws a share bar under the row, or a negative to omit it.
The gain bar sensor-fusion draws under each sensor: how much this reading actually moved the estimate.
dim : real |
0..1 - fades the swatch for a stale or inactive source.
A sensor that stopped reporting should look like it stopped reporting.
label : string |
What it is (already translated).
showSwatch : bool |
Draw the swatch (off for a plain stat line).
swatch : color |
The colour this thing wears elsewhere.
value : string |
What it reads right now.
valueColor : color |
Value colour; use alarm to raise it.