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§
Sourcefn before_theme_change(&mut self, _old_theme: Theme, _new_theme: Theme)
fn before_theme_change(&mut self, _old_theme: Theme, _new_theme: Theme)
Called before a theme change is applied.
Sourcefn after_theme_change(&mut self, _theme: Theme)
fn after_theme_change(&mut self, _theme: Theme)
Called after a theme change is applied.
Sourcefn customize_theme(&self, _theme: Theme) -> Option<ThemeCustomization>
fn customize_theme(&self, _theme: Theme) -> Option<ThemeCustomization>
Optionally provide custom colors for the theme.