You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ui): put the homescreen and more info on one grid (v0.7.0-beta.76)
Both screens grew through a long run of single fixes, and each one moved one
number without pulling its neighbours along. What was left was not a grid but
a pile of individual decisions: the outer margin was 6 px in the header and
8 px in zone 3, the three values of row A sat on baselines 80, 81 and 82, and
the material reserve ran 20 px into the filament column because an earlier fix
pulled filament from 260 to 232 and left the width at 160. Nothing was broken,
which is why it survived so long - it was only never quiet.
What everything answers to now: 8 px outer margin left and right, one baseline
per row whatever font sizes sit in it, 18 px from a caption's baseline to its
value's baseline, captions font 12 in 4a6fa0, the swatch on the middle of its
text line, and no reserved width reaching into the next column. Zone 3 splits
the width in half at 8 / 244; zones 4 and 5 have to keep a slot free on the
right for TARE and the burger and sit on 8 / 218 with the divider at 210.
That is the one break in the grid, and it is the content asking for it.
Two numbers had to be measured rather than picked. A label's baseline is
y + line_height - base_line, so a constant y offset means a different optical
distance for every font size - which is how more info came to have 17, 22, 22,
15 and 18 px for the same caption-and-value construction while the source read
as a tidy 18, 13 and 16. And 2a4060, which the design guide asks for on row A
captions, is 1.7:1 on 0a1020: a shape colour for rules and inactive bars, not
a text colour. The homescreen never followed that line and was right not to.
The header chips needed more than coordinates. Their widths move at runtime -
"NFC" becomes "NFC!" on an error, the badge follows the backend - so fixed
offsets could only ever be even for one of those states. layoutHeaderChips()
packs them from the right with one gap, behind an explicit
lv_obj_update_layout(), because align_to reads a width that a content-sized
label only knows once the layout has run. The status bar address hangs off the
scan counter for the same reason: that counter gains a digit and a fixed
offset would eventually run into it. Its own width is down to 292 px, which
still clears the longest string that lands there by some 45 px.
The bar width was a bare 190 in three places, which is precisely why the bar
and its background would have drifted apart the moment one of them was
widened. It is MAIN_BAR_W now.
vdiv2 was a 0 x 0 object rather than a deleted one, so zone 4 had a divider on
its left and nothing on its right. It draws again.
0 commit comments