Skip to main content

Module theme

Module theme 

Source
Expand description

Theming. A palette the custom-painted components (graph/depgraph/map) read from the egui context, plus matching egui Visuals for the standard widgets (pop/table/pipeline). Call set_theme once on the context and every facet follows. Ships a Theme::default look, a Theme::sci_fi neon-on-near-black look, and a switchable family of striking palettes (Theme::nordic_aurora, Theme::cyberpunk_neon, Theme::amber_crt, Theme::deep_space, Theme::hugin_noir). Enumerate them with Theme::ALL / Theme::by_name to build a picker.

Modules§

probe
Palette-consumption probe — the machine-readable witness that a component consumed the active Theme. theme records the palette name it returns here; a headless test resets the probe, renders one component, then reads painted to assert the component painted with the palette it was given (not default). Thread-local so parallel test cells don’t interfere; cheap (a Cell), and a no-op cost for production renders that never read it.

Structs§

Theme
The facett palette. All custom-painted colours come from here.

Functions§

set_theme
Store theme on the context and apply its egui Visuals. Call once per frame (cheap) or whenever the theme changes; every facet picks it up.
theme
The theme stored on the ui’s context (or Theme::default if none).