S016: R1-21 controls hold still under the pointer

segmented keys its animation state on its widget id instead of its screen
position (the recording showed wrong checks while scrolling); Interface size
uses a new settled_slider that shows a value label while dragged and sets the
value on release; filter_chip keeps one width; zoom resets at 100 %.
Selftest press/drag/release and scroll; smoke scripts sliders(-visible).txt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-12 07:41:24 -06:00
commit f2dd1cc35c
2 changed files with 273 additions and 24 deletions

View file

@ -204,6 +204,7 @@ Slow 1.8; stiffness ÷ factor²); `theme::animation_time` drives egui's own anim
selected = `secondary_container` fill and filled icon.
- `switch(ui, &mut bool) -> changed`: M3 switch, handle travels (FAST) and grows with a check when on, hover halo.
- `segmented(ui, &mut T, &[(T, label)]) -> changed`: equal-width segments, selected = tonal fill + check that slides in.
Animation state is keyed on the widget's id, never its position (a position key breaks while the page scrolls).
- `card(ui, |ui| ...)`: `surface_container`, radius `L`; rows inside get hairlines between them (not above the first).
- `row(ui, title, description, |ui| control)`, `switch_row`, `link_row(ui, title, description) -> clicked` (whole
row is the button, chevron at the end), `section(ui, title)` (group title in `primary`, above a card).
@ -214,6 +215,11 @@ Slow 1.8; stiffness ÷ factor²); `theme::animation_time` drives egui's own anim
the text when it doesn't fit beside 220 pt of text (`request_discard`, no flicker). `highlight_rows(ctx, query)`
tints and counts matching rows (settings search). `chip`, `choice_chips` (one of many), `toggle_chips` (any of),
`input_chip` (label + ×), `slider` (M3 Expressive, moved from Customize).
- Still under the pointer (R1-21): a control never changes the layout around itself while it is used.
`filter_chip(ui, label, on)` (used by `choice_chips` / `toggle_chips` and on/off chips) keeps one width, the check
slides in over reserved space. `slider` sets its value live, for settings that only repaint (contrast, dim,
blur); `settled_slider(…, &|v| label)` is for settings that re-lay out the page (interface size): while dragged
only the handle and an M3 value label move, the value is set on release (a click or arrow key sets it at once).
**Settings** (S019, `src/ui/pages/settings.rs`). Rail 264 pt (title, search pill, 48 pt entries, sliding
`secondary_container` pill); under 760 pt page width an 88 pt icon rail (56×32 pill, short label under) with the

View file

@ -194,8 +194,22 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done,
- Later: the original's history, bookmarks and passwords toolbar flyouts (search pill, timed rows); today those
buttons open the pages.
## S016 follow-up — R1-21 controls hold still under the pointer (2026-11-12)
- Recording: Appearance page while scrolling; segmented buttons showed other controls' checks. Cause: `segmented`
keyed its animation state on its screen position. Now on its own widget id (DESIGN.md "Widgets").
- Interface size: new `settled_slider` (value label while dragged, set on release; click and arrows at once), so the
page no longer rescales under the pointer. Contrast, dim, blur stay live (repaint only). Going back to 100 % now
resets the zoom (`style_window` skipped 1.0).
- `filter_chip` keeps one width (check slides into reserved space): Style chips, toggle chips, import chips, the
permission prompt's Remember and find's Match case no longer push their neighbours.
- Selftest `press` / `drag` / `release`, `scroll x y dy`. Tests: settled slider, filter chip width (58 green).
- Verified: `SMOKE_SIZE=1280x1600 tools/smoke.sh tests/smoke/sliders.txt` and `SMOKE_VISIBLE=1 … sliders-visible.txt`
shots (held: label, page 100 %; released: 125 %; scroll: right checks). Not proven: the recording's tearing-like
frames (looks like capture tearing, not reproduced); no regression test for the segmented id.
## Later
- System accent: watch caelestia scheme.json / the portal `accent-color` and restyle live (R1-11).
- Reader mode, split view, translate, real gamepad rumble (D-002: not planned for now).
- Packaging and first release (D-001: plan when the user asks).
- Shortcut icons: a favicon cache by host (today only open tabs' favicons show); a `scroll` selftest command.
- Shortcut icons: a favicon cache by host (today only open tabs' favicons show).
- Interface size above ~110 % on a narrow (772 px) window clips wide segmented rows at the right (R1-21 visible run).