Theme

Trait Theme 

Source
pub trait Theme {
    // Required methods
    fn of(&self, id: WidgetId) -> Option<Style>;
    fn defaults(&self) -> DefaultStyles;
    fn window_background(&self) -> Color;
    fn globals(&self) -> &Globals;
    fn globals_mut(&mut self) -> &mut Globals;
}
Expand description

Base trait for all themes.

Required Methods§

Source

fn of(&self, id: WidgetId) -> Option<Style>

Return the Style of the given widget using its ID. Returns None if the theme does not have styles for the given widget. In that case, you should use Theme::defaults to get widget style defaults.

Source

fn defaults(&self) -> DefaultStyles

Get the default widget styles.

Source

fn window_background(&self) -> Color

Get the background color of the window.

Source

fn globals(&self) -> &Globals

Get global style values.

Source

fn globals_mut(&mut self) -> &mut Globals

Get mutable global style values.

Implementors§