44ea45150f
The floating tab bar is now sized to its icon tabs at the bottom right on every width, the selected icon sits in a tinted circle on both hosts, and the gap from each outer circle to the pill's sides equals the gap to its top, bottom and neighbours.
1.6 KiB
1.6 KiB
Floating tab bars: compact everywhere, circular selection, equal gaps
Supersedes the "Sizes" bullets of notes/tab-bars-v2.md and its "at 560 the
bars are full width".
FloatingDestinationBaris compact at every width: sized to its tabs at the bottom right (top start atFloatingBarEdge.top), on phones too. Taps beside it reach the content.- The selected icon sits in a tinted circle (Material 40 = 24 + 2x8 in
secondaryContainer, the stock indicator made transparent with aCircleBorderink; Cupertino 38 = 26 + 2x6 in the primary colour at 16%). - One gap everywhere: circle to pill top/bottom, outer circle to pill side,
and between neighbours. Material 8 (pill 56 high, tab 48, 4 tabs = 200
wide); Cupertino 6 (pill 50, tab 44, 4 tabs = 182). The pill's round ends
are concentric with the outer circles.
FloatingDestinationBar.pillWidthgives the width; a squeezed pill keeps the edge gap and narrows the inner gaps. - Cupertino: the icon gets 4 top padding to cancel the host's 4 bottom inset, so the circle is vertically centred.
Tests: test/ui/adaptive/floating_bar_edge_gap_test.dart (both hosts; 1200/4,
390/3, 390/4, 560/5, 320/5 tabs; first and last selected: side gap = top gap
= bottom gap = neighbour gap within 1px; concentric ends; phone taps beside
the bar; 320 at 2x without overflow). Phone full-width assertions in shell,
run, stage and pipeline tab tests were updated to the compact width.
Evidence: /tmp/tab-edge-evidence/ — {material,cupertino}-{light,dark}- {pipelines,search}-{560,1200}.png from tool/floating_tabs_probe_entry.dart
in headless Chrome (first and last tab selected).