pub struct SwitchColors {
pub container: Color,
pub label: Color,
pub secondary_label: Color,
pub track: Color,
pub track_border: Color,
pub thumb: Color,
pub tick: Color,
}Expand description
The colours one state of the switch draws with.
Fields§
§container: Color§label: Color§secondary_label: Color§track: Color§track_border: ColorColor::rgba(_, _, _, 0.0) when the border is suppressed.
thumb: Color§tick: ColorImplementations§
Source§impl SwitchColors
impl SwitchColors
Sourcepub fn of(colors: WearColors, checked: bool) -> Self
pub fn of(colors: WearColors, checked: bool) -> Self
The slots a switch resolves to at a given checked state.
The border suppression lives here: if currentTrackColor == currentTrackBorderColor { borderColor = Color.Transparent }, which in
the checked state is always true because both are primary.
Trait Implementations§
Source§impl Clone for SwitchColors
impl Clone for SwitchColors
Source§fn clone(&self) -> SwitchColors
fn clone(&self) -> SwitchColors
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 moreimpl Copy for SwitchColors
Source§impl Debug for SwitchColors
impl Debug for SwitchColors
Source§impl PartialEq for SwitchColors
impl PartialEq for SwitchColors
impl StructuralPartialEq for SwitchColors
Auto Trait Implementations§
impl Freeze for SwitchColors
impl RefUnwindSafe for SwitchColors
impl Send for SwitchColors
impl Sync for SwitchColors
impl Unpin for SwitchColors
impl UnsafeUnpin for SwitchColors
impl UnwindSafe for SwitchColors
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