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§
Sourcefn of(&self, id: WidgetId) -> Option<Style>
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.
Sourcefn defaults(&self) -> DefaultStyles
fn defaults(&self) -> DefaultStyles
Get the default widget styles.
Sourcefn window_background(&self) -> Color
fn window_background(&self) -> Color
Get the background color of the window.
Sourcefn globals_mut(&mut self) -> &mut Globals
fn globals_mut(&mut self) -> &mut Globals
Get mutable global style values.