Use strikethrough style in label implementation (#20735)
Release Notes: - N/A --------- Co-authored-by: Richard Feldman <richard@zed.dev> Co-authored-by: Marshall Bowers <marshall@zed.dev>
This commit is contained in:
parent
c491b75e07
commit
cc601bd770
1 changed files with 1 additions and 10 deletions
|
@ -157,16 +157,6 @@ impl RenderOnce for LabelLike {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.base
|
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 {
|
.map(|this| match self.size {
|
||||||
LabelSize::Large => this.text_ui_lg(cx),
|
LabelSize::Large => this.text_ui_lg(cx),
|
||||||
LabelSize::Default => this.text_ui(cx),
|
LabelSize::Default => this.text_ui(cx),
|
||||||
|
@ -187,6 +177,7 @@ impl RenderOnce for LabelLike {
|
||||||
});
|
});
|
||||||
this
|
this
|
||||||
})
|
})
|
||||||
|
.when(self.strikethrough, |this| this.line_through())
|
||||||
.text_color(color)
|
.text_color(color)
|
||||||
.font_weight(self.weight.unwrap_or(settings.ui_font.weight))
|
.font_weight(self.weight.unwrap_or(settings.ui_font.weight))
|
||||||
.children(self.children)
|
.children(self.children)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue