Skip to main content

set_window_material_theme

Function set_window_material_theme 

Source
pub fn set_window_material_theme(
    theme: Option<MaterialTheme>,
    window: &mut Window,
    cx: &mut App,
)
Expand description

Sets or clears the override for Material elements in this window.

Material controls pass local presentation to their Base-backed parts without mutating Base’s application-global theme. Standalone Base controls inside an overridden window or subtree can call crate::current_base_theme or project_base_theme to apply matching local tokens and scrollbar styles.