4d9ee1ea78
Inside a glass bar the first and last controls now keep the same gap from the pill's sides as from its top and bottom, from shared GlassBarMetrics (48/44 targets, 8 edge gap). Applies to the artifact viewer bar (hugs its actions without a pager), the chevron pagers (position text inset like an icon), and the chat composer's Cupertino Send/Stop (centred circle). Run 7 in the full-app probe now records change captures for diff captures.
30 lines
1.6 KiB
Markdown
30 lines
1.6 KiB
Markdown
# Glass control bars: equal edge gaps
|
|
|
|
Operator report: in the viewers the first controls sat too close to the bar's
|
|
left end while the top and bottom had room.
|
|
|
|
Rule (`lib/ui/adaptive/glass_bar.dart`, `GlassBarMetrics`): inside a glass
|
|
bar the first and last controls keep the same gap from the pill's sides as
|
|
from its top and bottom, `(pill height - control height) / 2`, and
|
|
neighbours touch target to target (even icon spacing). Targets are the
|
|
platform minimum (48 Material, 44 Cupertino), icons 28/30, edge gap 8, so a
|
|
bar is 64/60 tall. `GlassControlBar` applies it.
|
|
|
|
- Artifact viewer bottom bar: `GlassControlBar`; Cupertino actions lost their
|
|
extra 8px padding (46px targets) for 44px squares; without a pager the bar
|
|
hugs its actions instead of spanning the width.
|
|
- `ChevronPager` (diff page pager, Changes visit pager, artifact pager): the
|
|
position text keeps an icon's inset on each side, so it starts where an
|
|
icon at that end would be drawn; it had no gap from the pill's edge.
|
|
- Chat composer: Cupertino Send/Stop is a 36px filled circle centred in a
|
|
44px target (it was a 28px-high small button pinned to the bottom); the
|
|
pill gap is the shared `fieldEdgeGap` (4).
|
|
- Verified unchanged: top bar actions pill (controls fill it, 0 gap on every
|
|
side), graph viewport controls (same), artifact gallery grid/list switch and
|
|
stage/visit section controls (native segmented controls, not glass bars),
|
|
run header strip (status text, not a control row).
|
|
|
|
Tests: `test/ui/adaptive/glass_bar_test.dart` (both hosts, 390px, text 1.0
|
|
and 1.3). Captures: `/tmp/bar-padding/` (full-app probe; run 7 now records
|
|
change captures so Changes opens paged diffs).
|