[][src]Trait kas::ThemeApi

pub trait ThemeApi {
    fn set_font_size(&mut self, size: f32) -> ThemeAction;
fn set_colours(&mut self, _scheme: &str) -> ThemeAction; fn set_theme(&mut self, _theme: &str) -> ThemeAction { ... } }

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 theme by this name is found, the theme is unchanged.

Loading content...

Provided methods

fn set_theme(&mut self, _theme: &str) -> ThemeAction

Change the theme itself

Themes may do nothing, or may react according to their own interpretation of this method.

Loading content...

Implementations on Foreign Types

impl<T: ThemeApi> ThemeApi for Box<T>[src]

Loading content...

Implementors

Loading content...