Skip to main content

ThemeHook

Trait ThemeHook 

Source
pub trait ThemeHook: Send + Sync {
    // Provided methods
    fn before_theme_change(&mut self, _old_theme: Theme, _new_theme: Theme) { ... }
    fn after_theme_change(&mut self, _theme: Theme) { ... }
    fn customize_theme(&self, _theme: Theme) -> Option<ThemeCustomization> { ... }
}
Expand description

Hook for theme-related events.

Provided Methods§

Source

fn before_theme_change(&mut self, _old_theme: Theme, _new_theme: Theme)

Called before a theme change is applied.

Source

fn after_theme_change(&mut self, _theme: Theme)

Called after a theme change is applied.

Source

fn customize_theme(&self, _theme: Theme) -> Option<ThemeCustomization>

Optionally provide custom colors for the theme.

Implementors§