#[non_exhaustive]pub struct ResolvedSwitchTheme {Show 13 fields
pub checked_background: Rgba,
pub unchecked_background: Rgba,
pub thumb_background: Rgba,
pub track_width: f32,
pub track_height: f32,
pub thumb_diameter: f32,
pub track_radius: f32,
pub disabled_opacity: f32,
pub hover_checked_background: Option<Rgba>,
pub hover_unchecked_background: Option<Rgba>,
pub disabled_checked_background: Option<Rgba>,
pub disabled_unchecked_background: Option<Rgba>,
pub disabled_thumb_color: Option<Rgba>,
}Expand description
Toggle switch track, thumb, geometry, and interactive states.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.checked_background: RgbaTrack background when the switch is on.
unchecked_background: RgbaTrack background when the switch is off.
thumb_background: RgbaThumb (knob) color.
track_width: f32Track width in logical pixels.
track_height: f32Track height in logical pixels.
thumb_diameter: f32Thumb diameter in logical pixels.
track_radius: f32Track corner radius in logical pixels.
disabled_opacity: f32Opacity multiplier when disabled (0.0-1.0).
hover_checked_background: Option<Rgba>Track hover color when checked (on).
hover_unchecked_background: Option<Rgba>Track hover color when unchecked (off).
disabled_checked_background: Option<Rgba>Track color when disabled and checked.
disabled_unchecked_background: Option<Rgba>Track color when disabled and unchecked.
disabled_thumb_color: Option<Rgba>Thumb color when disabled.
Trait Implementations§
Source§impl Clone for ResolvedSwitchTheme
impl Clone for ResolvedSwitchTheme
Source§fn clone(&self) -> ResolvedSwitchTheme
fn clone(&self) -> ResolvedSwitchTheme
Returns a duplicate of the value. Read more
1.0.0 · 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 ResolvedSwitchTheme
impl Debug for ResolvedSwitchTheme
Source§impl<'de> Deserialize<'de> for ResolvedSwitchTheme
impl<'de> Deserialize<'de> for ResolvedSwitchTheme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ResolvedSwitchTheme
impl PartialEq for ResolvedSwitchTheme
Source§impl Serialize for ResolvedSwitchTheme
impl Serialize for ResolvedSwitchTheme
impl StructuralPartialEq for ResolvedSwitchTheme
Auto Trait Implementations§
impl Freeze for ResolvedSwitchTheme
impl RefUnwindSafe for ResolvedSwitchTheme
impl Send for ResolvedSwitchTheme
impl Sync for ResolvedSwitchTheme
impl Unpin for ResolvedSwitchTheme
impl UnsafeUnpin for ResolvedSwitchTheme
impl UnwindSafe for ResolvedSwitchTheme
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