pub trait ToggleSwitchStyle {
fn track_width(&self) -> f64;
fn track_height(&self) -> f64;
fn thumb_radius(&self) -> f64;
fn thumb_padding(&self) -> f64;
fn label_gap(&self) -> f64 {
8.0
}
}
pub struct IndicatorToggleStyle;
impl ToggleSwitchStyle for IndicatorToggleStyle {
fn track_width(&self) -> f64 { 44.0 }
fn track_height(&self) -> f64 { 22.0 }
fn thumb_radius(&self) -> f64 { 8.0 }
fn thumb_padding(&self) -> f64 { 4.0 }
}
pub struct SignalsToggleStyle;
impl ToggleSwitchStyle for SignalsToggleStyle {
fn track_width(&self) -> f64 { 44.0 }
fn track_height(&self) -> f64 { 22.0 }
fn thumb_radius(&self) -> f64 { 9.0 }
fn thumb_padding(&self) -> f64 { 2.0 }
}
pub trait ToggleIconStyle {
fn icon_size(&self) -> f64;
}
pub struct DefaultToggleIconStyle;
impl ToggleIconStyle for DefaultToggleIconStyle {
fn icon_size(&self) -> f64 { 16.0 }
}