Module selector
Expand description
One painter for everything you choose one of: the window group’s tab
strip, an in-app TabBar, the segments of a ToggleGroup and the top
bar’s selectors (crates/sdk/ui-core/HIG.md §9.3).
A selector is a SelectionState resolved against the ground it stands
on (selector_tier): idle paints nothing, hover is a translucent film
of the active lift, and active is that lift opaque, with an edge and a
lit rim. A docked strip of selectors stands on a body of its own
(SelectorRole::Strip), made of the floating material, so tabs are
never an unblurred translucent surface over the desktop. The theme’s
crate::tokens::SelectorFinish says what the strip is made of and how
strong the rim and the hover film are; high contrast, forced colours and
reduced transparency make all of it opaque.
Enums§
- Selector
Role - What of a selector is painted.
Functions§
- paint_
selector - Paint one selector: a strip body or an item, on
shape. - selector_
finish - The finish this theme paints selectors with: the theme’s own, or
SelectorFinish::OPAQUEwhere nothing may be translucent. - selector_
tier - How one selector on
groundpaints forstate. - strip_
ground - The ground a docked strip’s items stand on: the panel ground its material is tinted with, which is also the whole of it where nothing is blurred. On a light palette it stays one surface step below white, so the active tab can rise a full step toward the light above it.
- strip_
shape - The capsule a strip of selectors at
rectis drawn as, concentric with items insetinsetinside it atitem_radius.