Expand description
Theming: the Theme surface, where it comes from (ThemeSource), the
per-popup MenuOptions, and the pure resolution of a semantic Color
into a concrete Rgba.
A ThemeSource chooses the look: System(..) matches the host OS (and
alone receives the backend’s live accent/color/font injection),
MacOs/Windows/Gnome force a specific platform look on any host,
Preset is a built-in skin, and Custom is fully hand-built. This pure
layer resolves a source to a concrete Theme, fully unit-testable
without any GUI.
Structs§
- Menu
Options - Tunable popup options layered on top of the
Theme. - Theme
- The full visual theme. Every semantic
Colorresolves against one of these, and spacing/radius/row-height are tunable so a consumer can fully restyle.
Enums§
- Gutter
Policy - How the popup reserves the leading (checkmark/icon) gutter (#43).
- OsFamily
- A platform’s native menu look. Selected by
ThemeSourceand built byTheme::for_family. The host family is supplied by the platform backend (nocfgcrosses the seam), so a caller can also request a foreign family — e.g. a macOS app asking for theWindowslook. - Preset
- A built-in non-OS theme skin, selectable via
ThemeSource::Preset. These render as-authored on every platform (no live OS accent/color/font injection). - Theme
Mode - Light/dark selection for a themed OS look.
Autofollows the host OS appearance;Light/Darkforce it. - Theme
Source - Where the theme comes from.
- Trailing
Gutter Policy - How the popup reserves the trailing (submenu chevron / trailing accessory)
gutter (#60). Symmetric to the leading
GutterPolicy.