Skip to main content

AppExt

Trait AppExt 

Source
pub trait AppExt {
    // Required methods
    fn brand(&self) -> Brand;
    fn set_brand(&mut self, brand: Brand);
    fn appearance_mode(&self) -> AppearanceMode;
    fn set_appearance_mode(&mut self, mode: AppearanceMode);
    fn set_palette(&mut self, build: fn(Appearance) -> Theme);
    fn set_base_text_size(&mut self, points: f32);
}
Expand description

Configuration carried by the application. Import as use theme::AppExt as _;.

Required Methods§

Source

fn brand(&self) -> Brand

Reads brand.

Source

fn set_brand(&mut self, brand: Brand)

Installs a brand, rebuilds the palette and refreshes window backgrounds.

Source

fn appearance_mode(&self) -> AppearanceMode

Reads appearance mode.

Source

fn set_appearance_mode(&mut self, mode: AppearanceMode)

Changes the preference after appearance::init; repaints if needed.

Source

fn set_palette(&mut self, build: fn(Appearance) -> Theme)

Sets the palette builder. Install before appearance::init, or apply afterward.

Source

fn set_base_text_size(&mut self, points: f32)

Sets the shared type ladder’s base size in points and refreshes windows.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AppExt for App

Source§

fn brand(&self) -> Brand

Source§

fn set_brand(&mut self, brand: Brand)

Source§

fn appearance_mode(&self) -> AppearanceMode

Source§

fn set_appearance_mode(&mut self, mode: AppearanceMode)

Source§

fn set_palette(&mut self, build: fn(Appearance) -> Theme)

Source§

fn set_base_text_size(&mut self, points: f32)

Implementors§