Skip to main content

Module theme

Module theme 

Source
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§

MenuOptions
Tunable popup options layered on top of the Theme.
Theme
The full visual theme. Every semantic Color resolves against one of these, and spacing/radius/row-height are tunable so a consumer can fully restyle.

Enums§

GutterPolicy
How the popup reserves the leading (checkmark/icon) gutter (#43).
OsFamily
A platform’s native menu look. Selected by ThemeSource and built by Theme::for_family. The host family is supplied by the platform backend (no cfg crosses the seam), so a caller can also request a foreign family — e.g. a macOS app asking for the Windows look.
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).
ThemeMode
Light/dark selection for a themed OS look. Auto follows the host OS appearance; Light/Dark force it.
ThemeSource
Where the theme comes from.
TrailingGutterPolicy
How the popup reserves the trailing (submenu chevron / trailing accessory) gutter (#60). Symmetric to the leading GutterPolicy.