[][src]Trait kas::ThemeApi

pub trait ThemeApi {
    pub fn set_font_size(&mut self, pt_size: f32) -> ThemeAction;
pub fn set_colours(&mut self, _scheme: &str) -> ThemeAction; pub 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

pub fn set_font_size(&mut self, pt_size: f32) -> ThemeAction[src]

Set font size

Units: Points per Em (standard unit of font size)

pub fn set_colours(&mut self, _scheme: &str) -> ThemeAction[src]

Change the colour scheme

If no scheme by this name is found the scheme is left unchanged.

Loading content...

Provided methods

pub fn set_theme(&mut self, _theme: &str) -> ThemeAction[src]

Switch the theme

Most themes do not react to this method; kas_theme::MultiTheme uses it to switch themes.

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

Loading content...