ThemeProvider

Trait ThemeProvider 

Source
pub trait ThemeProvider: Send + Sync {
    // Required methods
    fn get_title_bar_theme(
        &self,
        theme_id: &str,
        mode: ThemeMode,
    ) -> Option<TitleBarTheme>;
    fn get_egui_visuals(
        &self,
        theme_id: &str,
        mode: ThemeMode,
    ) -> Option<Visuals>;
    fn list_available_themes(&self) -> Vec<String>;
}
Expand description

A provider interface for supplying themes by identifier at runtime.

Required Methods§

Source

fn get_title_bar_theme( &self, theme_id: &str, mode: ThemeMode, ) -> Option<TitleBarTheme>

Return a TitleBarTheme for the given theme id and mode, if available

Source

fn get_egui_visuals(&self, theme_id: &str, mode: ThemeMode) -> Option<Visuals>

Return egui Visuals for the given theme id and mode, if available

Source

fn list_available_themes(&self) -> Vec<String>

List all available theme ids

Implementors§