pub struct Appearance {
pub is_dark: bool,
pub primary: u8,
pub secondary: u8,
pub brightness: u8,
}Fields§
§is_dark: bool§primary: u8Zero selects the zinc palette’s mode-dependent color.
secondary: u8§brightness: u8Screen backlight level, from MINIMUM_BRIGHTNESS to
BRIGHTNESS_FULL. Ignored on screens without brightness control.
Implementations§
Source§impl Appearance
impl Appearance
pub fn colors(self) -> (Color, Color)
Sourcepub async fn apply(
self,
manager: &Manager,
guard: &mut GraphicsGuard<'_>,
) -> Result<()>
pub async fn apply( self, manager: &Manager, guard: &mut GraphicsGuard<'_>, ) -> Result<()>
Apply the theme and the screen brightness. Screens without brightness control keep their level.
Sourcepub async fn apply_brightness(self, manager: &Manager) -> Result<()>
pub async fn apply_brightness(self, manager: &Manager) -> Result<()>
Apply only the screen brightness, raised to MINIMUM_BRIGHTNESS.
Screens without brightness control keep their level. The LVGL lock may
be held or not.
pub async fn load(vfs: &VirtualFileSystem, task: TaskIdentifier) -> Result<Self>
Sourcepub async fn save(
self,
vfs: &VirtualFileSystem,
task: TaskIdentifier,
) -> Result<()>
pub async fn save( self, vfs: &VirtualFileSystem, task: TaskIdentifier, ) -> Result<()>
Persist this user’s choices. Callers must serialize saves for that user; Settings does so with the LVGL lock held during event dispatch.
Trait Implementations§
Source§impl Clone for Appearance
impl Clone for Appearance
Source§fn clone(&self) -> Appearance
fn clone(&self) -> Appearance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Appearance
impl Debug for Appearance
Source§impl Default for Appearance
impl Default for Appearance
Source§impl PartialEq for Appearance
impl PartialEq for Appearance
Source§fn eq(&self, other: &Appearance) -> bool
fn eq(&self, other: &Appearance) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for Appearance
impl Eq for Appearance
impl StructuralPartialEq for Appearance
Auto Trait Implementations§
impl Freeze for Appearance
impl RefUnwindSafe for Appearance
impl Send for Appearance
impl Sync for Appearance
impl Unpin for Appearance
impl UnsafeUnpin for Appearance
impl UnwindSafe for Appearance
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