pub struct Theme {
pub id: u8,
pub primary: Color,
pub secondary: Color,
pub accent: Color,
pub bg: Color,
}Expand description
The preferred color scheme of the peer.
Can be useful for:
- Making UI that matches the system UI.
- Preventing image flashes by making the UI background the same as in the system UI.
- Providing and auto-switching the dark and light mode.
Fields§
§id: u8§primary: ColorThe main color of text and boxes.
secondary: ColorThe color of disable options, muted text, etc.
accent: ColorThe color of important elements, active options, etc.
bg: ColorThe background color, the most contrast color to primary.
Trait Implementations§
impl Copy for Theme
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnsafeUnpin for Theme
impl UnwindSafe for Theme
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