From cc601bd770868f07720e27cae751e6918da47d53 Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Fri, 15 Nov 2024 10:57:23 -0700 Subject: [PATCH] Use strikethrough style in label implementation (#20735) Release Notes: - N/A --------- Co-authored-by: Richard Feldman Co-authored-by: Marshall Bowers --- crates/ui/src/components/label/label_like.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/crates/ui/src/components/label/label_like.rs b/crates/ui/src/components/label/label_like.rs index 0bd21eda4f..fd7303082a 100644 --- a/crates/ui/src/components/label/label_like.rs +++ b/crates/ui/src/components/label/label_like.rs @@ -157,16 +157,6 @@ impl RenderOnce for LabelLike { } self.base - .when(self.strikethrough, |this| { - this.relative().child( - div() - .absolute() - .top_1_2() - .w_full() - .h_px() - .bg(Color::Hidden.color(cx)), - ) - }) .map(|this| match self.size { LabelSize::Large => this.text_ui_lg(cx), LabelSize::Default => this.text_ui(cx), @@ -187,6 +177,7 @@ impl RenderOnce for LabelLike { }); this }) + .when(self.strikethrough, |this| this.line_through()) .text_color(color) .font_weight(self.weight.unwrap_or(settings.ui_font.weight)) .children(self.children)