Expand description
Theme-driven text-selection styling (D105 ext pattern, D124 follow-up).
Registered ONCE on the theme — never per-widget:
ⓘ
let theme = dark_theme().with_ext(SelectionStyle::glass());TextInput/TextArea resolve it from ctx.theme.ext::<SelectionStyle>()
at paint time; no style registered means SelectionStyle::flat — the
exact pre-existing look, so apps that never touch this see zero change.
Two built-in kinds:
SelectionKind::Flat— Material-style: flat tint band behind the glyphs + round drag grips below each endpoint.SelectionKind::Glass— Liquid-Glass-style: softer tint, iOS-style lollipop handles (vertical bar through the line, grip at the bottom anchor the engine’s handle-drag already targets), and a backdrop-sampling MAGNIFIER pill over the selected text — the Phase 28 Step 7 magnifier, finally landed. Single-line fields only; a multi-line lens (TextArea) is deferred with the same GPU-path notes as every backdrop material.
Structs§
- Glass
Lens - See
SelectionStyle::glass_lens. Plain data,(x, y, w, h)rects. - Selection
Style - Theme-extension value carrying the selection look — see the module doc.
Enums§
- Selection
Kind - Which selection look to render.