[−][src]Trait kas::ThemeApi
Interface through which a theme can be adjusted at run-time
All methods return a ThemeAction
to enable correct action when a theme
is updated via Manager::adjust_theme
. When adjusting a theme before
the UI is started, this return value can be safely ignored.
Required methods
fn set_font_size(&mut self, size: f32) -> ThemeAction
Set font size. Default is 18. Units are unknown.
fn set_colours(&mut self, _scheme: &str) -> ThemeAction
Change the colour scheme
If no scheme by this name is found, the scheme is unchanged.
Provided methods
fn set_theme(&mut self, _theme: &str) -> ThemeAction
Switch the theme
Most themes do not react to this method; kas_theme::MultiTheme
uses
it to switch themes.