mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-10 20:29:33 -06:00
Every section lays its rows out on the same grid: the panel is 240 pt, its content 16 pt in from the left and 8 pt from the right, two 88 pt columns at that width with 8 pt gutters and a 24 pt column for the buttons at a row's end (the columns are flex, so they share a wider panel); rows are 24 pt in a 32 pt track, captions 10 pt under them, labels and values 12 pt, the selection's type above them 14 pt. A row's two buttons (eye, minus) are one group on the row's right edge, 24 pt each and 4 pt apart. Two things put the right margins out before: block() inset every row by PAD on both sides (16/16 instead of 16/8), and the panel's frame carried a 1 pt stroke (egui counts a frame's stroke as its margin), which took a point off each side of the 240 pt panel. The edge is drawn inside the panel now. The paint, effect and layout grid rows reserve the whole button group before their field (8 + 24 + 4 + 24 = 60), so the group lands on the panel's 8 pt margin; the export preview frame takes the same 16 / 8. Every row that had its own width now asks the grid: the stroke's align and weight fields split what the row leaves (74 + 8 + 74 with two buttons, 88 + 8 + 88 with one), the type panel's size field and the full-width dropdowns take the row's own width, and the Inspect tab's rows end at the 8 pt margin. The fields' label inset is 8 (was 12) so "Intensity" fits its column whole beside its value; the glass field's width in field_tests follows the wider column. Tests: cargo test -p figcraft-ui-egui (549 passed).