pub struct SwitchTheme {
pub checked_background: Option<Rgba>,
pub unchecked_background: Option<Rgba>,
pub thumb_background: Option<Rgba>,
pub track_width: Option<f32>,
pub track_height: Option<f32>,
pub thumb_size: Option<f32>,
pub track_radius: Option<f32>,
}Expand description
Toggle switch track, thumb, and geometry.
Fields§
§checked_background: Option<Rgba>Track background when the switch is on.
unchecked_background: Option<Rgba>Track background when the switch is off.
thumb_background: Option<Rgba>Thumb (knob) color.
track_width: Option<f32>Track width in logical pixels.
track_height: Option<f32>Track height in logical pixels.
thumb_size: Option<f32>Thumb diameter in logical pixels.
track_radius: Option<f32>Track corner radius in logical pixels.
Implementations§
Source§impl SwitchTheme
impl SwitchTheme
Sourcepub const FIELD_NAMES: &[&str]
pub const FIELD_NAMES: &[&str]
All serialized field names for this widget theme, for TOML linting.
Source§impl SwitchTheme
impl SwitchTheme
Trait Implementations§
Source§impl Clone for SwitchTheme
impl Clone for SwitchTheme
Source§fn clone(&self) -> SwitchTheme
fn clone(&self) -> SwitchTheme
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 SwitchTheme
impl Debug for SwitchTheme
Source§impl Default for SwitchTheme
impl Default for SwitchTheme
Source§fn default() -> SwitchTheme
fn default() -> SwitchTheme
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SwitchThemewhere
SwitchTheme: Default,
impl<'de> Deserialize<'de> for SwitchThemewhere
SwitchTheme: Default,
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 SwitchTheme
impl PartialEq for SwitchTheme
Source§impl Serialize for SwitchTheme
impl Serialize for SwitchTheme
impl StructuralPartialEq for SwitchTheme
Auto Trait Implementations§
impl Freeze for SwitchTheme
impl RefUnwindSafe for SwitchTheme
impl Send for SwitchTheme
impl Sync for SwitchTheme
impl Unpin for SwitchTheme
impl UnsafeUnpin for SwitchTheme
impl UnwindSafe for SwitchTheme
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