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§
Sourcefn set_brand(&mut self, brand: Brand)
fn set_brand(&mut self, brand: Brand)
Installs a brand, rebuilds the palette and refreshes window backgrounds.
Sourcefn appearance_mode(&self) -> AppearanceMode
fn appearance_mode(&self) -> AppearanceMode
Reads appearance mode.
Sourcefn set_appearance_mode(&mut self, mode: AppearanceMode)
fn set_appearance_mode(&mut self, mode: AppearanceMode)
Changes the preference after appearance::init; repaints if needed.
Sourcefn set_palette(&mut self, build: fn(Appearance) -> Theme)
fn set_palette(&mut self, build: fn(Appearance) -> Theme)
Sets the palette builder. Install before appearance::init, or apply afterward.
Sourcefn set_base_text_size(&mut self, points: f32)
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".