[][src]Trait kas::prelude::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 scheme by this name is found, the scheme is unchanged.

Loading content...

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.

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

Loading content...