pub struct ThemeHandle { /* private fields */ }Expand description
A handle on the running theme. Copy, so it can move into any number of handlers.
Implementations§
Source§impl ThemeHandle
impl ThemeHandle
Sourcepub fn set_palette(&self, palette: Palette)
pub fn set_palette(&self, palette: Palette)
Lays a palette made at run time over the current theme. The palette is owned by this module; nothing has to be leaked by the caller.
Sourcepub fn clear_palette(&self)
pub fn clear_palette(&self)
Takes the application’s palette away, leaving the design system’s colours.
Sourcepub fn set_color_scheme(&self, scheme: ColorScheme)
pub fn set_color_scheme(&self, scheme: ColorScheme)
Picks light, dark, or following the system, keeping everything else.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThemeHandle
impl RefUnwindSafe for ThemeHandle
impl Send for ThemeHandle
impl Sync for ThemeHandle
impl Unpin for ThemeHandle
impl UnsafeUnpin for ThemeHandle
impl UnwindSafe for ThemeHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more