In a row, a bar included, the strip's least is its whole line again, so the
row's shrink step does not wrap it. It still wraps in a column narrower than
the strip. A rect with room for one line only keeps the segments on that line.
- ui-contract: `MeasureCx::in_row` says whether a component is a direct child
of a `Row` body.
One zoom_decimals helper serves both, so the read-only zoom texts (Navigator slider, full-window title, zoom bar
entries) agree with the zoom fields. with_zoom_precision is pub(crate). Regenerates docs/contract-api.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StyleCx::link_look drew links in accent.solid, which the theme holds only to
the 3:1 non-text minimum, so link text read at 2.93:1 on the light panel and
2.30:1 on the dark one. It now takes accent.text at every contrast, the
accent step the theme holds to 4.5:1 on the panel, raised and sunken
surfaces. accent.solid is unchanged, so buttons and fills keep their color.
A toast's card is the inverse surface, where accent.text reads at 2.57:1 in
the default light theme and 1.24:1 in the dark one. Link::on_inverse draws a
link in text.on_inverse, always underlined, and a toast's action links use it.
The room a docked group's header keeps for the shown tab did not count
the items the host adds before the tab strip (DockGroup::extra). The
header parts are sized before the header runs, so in a narrow group the
band kept its full width and the shown tab got what the host items left:
12.3 pt of the 44.4 pt a shrunk tab keeps in a 72 pt compact group with
one host button.
- ui-contract: layout_memory::emit_width and layout_memory::width hand
forward a measured width as emit_text and text hand forward a text. It
serves the rest of the pass, comes back with a kept measurement, and a
memoized view that replays emits it again.
- ui-panels: DockGroup's header hands forward the width its host items
take, and the header parts add it to the room they keep before the band
narrows. Until the header has handed it forward, and in groups without
host items, the band narrows as before.
Tests: a_narrow_groups_drag_band_leaves_room_for_the_hosts_header_items
(both densities, both directions, one and two host items, one and two
tabs), a_replayed_view_hands_forward_the_width_its_run_measured
In a header too narrow for the drag band and the shown tab, the band took
its whole width first and the tab strip got what was left. In the DockArea
story's 40 pt Tools column the shown tab was 2 pt wide at compact density
and missing at comfortable density, though TabStrip keeps the shown tab
visible.
- ui-contract: HeaderParts::end_narrows lets a container's end parts give
up width, down to a least, so the header's children keep a given room.
The header line applies it; headers that fit are unchanged.
- ui-panels: DockGroup keeps room for the shown tab with its first three
letters (with its icon, count, mark and close button, and the overflow
button beside other tabs), and its band narrows to an icon's width
before that room shrinks. Floating groups use the same header.
Test: a_narrow_groups_drag_band_narrows_before_the_shown_tab
The overlay host recorded every layer with LayerRole::Plain, since no path copied Overlay::role into
the layer's open entry, and JobProgress set no role. any_open's check for progress windows never
applied, so an app that waits while a dialog asks something counted its own progress window: it
drew the window only every second frame. The host now records the layer's role at all four places
it records a layer, Prompt takes a layer role, and JobProgress sets LayerRole::Progress. The new
OpenFilter::Asks counts modal layers except progress windows; Any, Modal and Keys still count a
progress window, as they did before. Trial a_job_window_is_a_modal_layer_that_asks_nothing.
The focus service takes egui's focus candidates of the pass (Memory::focus_candidates) at every
order-dependent registration and at the end hook: each widget no component made becomes a stop of
the app's own, where it was drawn among the framework's stops, a text stop for a TextEdit. Recorded
views and lazy children replay them with their transcripts.
A bare Tab is the framework's move unless an egui popup is open or the app's focused widget keeps
Tab by its egui key filter. Removed: focus::host_stop and the separate egui-Tab path for windows
without framework stops. The scrim absorber no longer takes key focus.
focus::host_stop registers an app's own egui widget as a focus stop
(Stop::host, as host_canvas does, without marking a document canvas), so a
window that has framework stops and the app's own widgets keeps one framework
Tab order holding both, in registration order.
A canvas keeps Tab only while it has the focus. With nothing focused a bare Tab
moves focus into the window or toggles the panels, even for a canvas that
keeps Tab, as the unfocused canvas's claims already never take Tab: the canvas
cannot trap keyboard navigation. The last assertion of
a_host_canvas_marks_the_window_and_tab_toggles_its_panels changes to this
rule: with nothing focused, the Tab toggles the panels instead of reaching the
canvas in egui. The unused Strip::canvas field goes with the old rule.
Layout memory requests its discard pass from egui in its end hook, after the
app's UI, so Context::will_discard() read by host code during a pass that a
changed size runs again is still false. frame::will_rerun is true when egui
will discard the pass or when this pass asked layout memory for the frame's
discard pass and will get it. Hosts gate frame counts and settle counts on it.
The discard request stays in the end hook, so lazy runs and memoized replays
keep their records of the asking pass.
Story trials have no host, so document-face and texture loads ran on default_jobs' threads and a fixture
could settle before a face landed (StyleList::variants on Windows: rtl 52.0 vs 52.8, motion shapes change
after the drive). InstallSpec::jobs sets where a context's background work runs while no host is installed;
Env::jobs_of (host, else installed, else default_jobs) replaces the two copies in the face registry and the
texture loader. testing::install_spec and the suite's language hosts use InlineJobs, so a load asked for in
one pass lands in the next on every machine; the two per-story InlineJobs options go.
A dropdown's opener (a picker's field or button) hands Up, Down, Page keys,
Enter and Tab to a collection in its dropdown. The framework took the first
type-ahead collection it found in the layer. The font picker's dropdown holds
the class column before the family list, so with filters shown Enter and the
arrows went to the class column: typing a name and pressing Enter picked
nothing.
Overlay::list (FocusPolicy::list) names the collection instead, and every
dropdown names its list: Select, ComboBox, TreePicker, completions, number
presets, PopupList (new PopupList::list) and the font picker, which names its
family list while it shows one. The type-ahead guess is gone.
FitItem::short now says that an item marked short_late takes its short
form only after no free item is left to leave. The first line of each new
builder's doc is a complete sentence, since docs/contract-api.md copies
only that line, and the module doc wraps like its neighbors.
docs/contract-api.md is regenerated with
cargo run -p craft-ui-gallery --bin contract-api; only FitItem's lines
change.
A host can now show a unit after a number that no UnitKind names,
such as kbps, s, MB, MiB or GiB, and count durations in milliseconds.
- UnitKind::Milliseconds shows "{n} ms", reads "250 ms" and "250ms",
and shows whole numbers by default.
- Param::unit_label(text) shows text after the number of a number,
int, optional-number, range or popup range row, in place of the
symbol of the row's unit. The row's unit still reads typed text.
- RowKind::unit_label(text) does the same for Preferences Int and
Float rows. Int and Float rows that count a UnitKind now draw its
symbol after the field, as RowKind documents.
Stories show both forms, and two trials check the drawn text and
that typed text is still read by the counted unit.