Skip to main content

set_default_theme

Function set_default_theme 

Source
pub fn set_default_theme(theme: Theme)
Expand description

Supply the base theme a shell seeds itself with, in place of its built-in fallback. Call before the first frame — typically from a design-system plugin’s install().

Unlike crate::theme_override::set_app_theme, this does NOT pin brightness: the shell’s retained theme object continues to re-derive light/dark from the platform’s appearance against this same base (see the module docs’ Precedence section). A late call (after the first frame) takes effect only if the app later calls clear_app_theme; until then, any active override dominates.

Callable from any thread (see the module docs’ thread contract); the process-wide slot is a plain Mutex, not a UI-thread-only primitive.