diff --git a/crates/ui/src/components/toggle.rs b/crates/ui/src/components/toggle.rs index f22ef743743351a12fd9c5e49c2d0c5ce241f380..86ff1d8eff8691a2610a4a7e2268aaf47502e306 100644 --- a/crates/ui/src/components/toggle.rs +++ b/crates/ui/src/components/toggle.rs @@ -344,7 +344,6 @@ pub struct Switch { label: Option, label_position: Option, label_size: LabelSize, - label_color: Color, full_width: bool, key_binding: Option, color: SwitchColor, @@ -362,7 +361,6 @@ impl Switch { label: None, label_position: None, label_size: LabelSize::Small, - label_color: Color::Default, full_width: false, key_binding: None, color: SwitchColor::default(), @@ -410,11 +408,6 @@ impl Switch { self } - pub fn label_color(mut self, color: Color) -> Self { - self.label_color = color; - self - } - pub fn full_width(mut self, full_width: bool) -> Self { self.full_width = full_width; self @@ -514,11 +507,7 @@ impl RenderOnce for Switch { self.label_position == Some(SwitchLabelPosition::Start), |this| { this.when_some(label.clone(), |this, label| { - this.child( - Label::new(label) - .color(self.label_color) - .size(self.label_size), - ) + this.child(Label::new(label).size(self.label_size)) }) }, ) @@ -527,11 +516,7 @@ impl RenderOnce for Switch { self.label_position == Some(SwitchLabelPosition::End), |this| { this.when_some(label, |this, label| { - this.child( - Label::new(label) - .color(self.label_color) - .size(self.label_size), - ) + this.child(Label::new(label).size(self.label_size)) }) }, )