pub enum ThemeSource {
Derived,
DerivedWithAccent(Color),
Pinned(Theme),
}Expand description
Where a Core’s theme comes from, re-read at
the start of every frame. Derived is the default.
Pinned makes this as big as a whole Theme, which is the point:
there is one of these per window, read once a frame, and boxing it to
save three hundred bytes would cost the Copy that lets a view hold
the answer without borrowing the core.
Variants§
Derived
Theme::from_system on whatever env.system currently says, so
the app follows the OS without writing a line about it.
DerivedWithAccent(Color)
The OS’s appearance, this accent. What an app with a brand colour wants: it should still go light when the user does.
Pinned(Theme)
Exactly this, following nothing.
Implementations§
Trait Implementations§
Source§impl Clone for ThemeSource
impl Clone for ThemeSource
impl Copy for ThemeSource
Source§impl Debug for ThemeSource
impl Debug for ThemeSource
Source§impl Default for ThemeSource
impl Default for ThemeSource
Source§impl PartialEq for ThemeSource
impl PartialEq for ThemeSource
impl StructuralPartialEq for ThemeSource
Auto Trait Implementations§
impl Freeze for ThemeSource
impl RefUnwindSafe for ThemeSource
impl Send for ThemeSource
impl Sync for ThemeSource
impl Unpin for ThemeSource
impl UnsafeUnpin for ThemeSource
impl UnwindSafe for ThemeSource
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