gpui: Fix line_through
, underline
position when used text center or right (#24721)
Release Notes: - N/A --- | Before | After | | --- | --- | | <img width="912" alt="image" src="https://github.com/user-attachments/assets/0640ac85-ee5d-4707-b866-997e36608c18" /> | <img width="912" alt="image" src="https://github.com/user-attachments/assets/caf84477-a7bc-4c22-a9e6-f44c3b6f86ef" /> | And fix the `line_through` doc link.
This commit is contained in:
parent
b61171f152
commit
4b153e7f7f
3 changed files with 30 additions and 4 deletions
|
@ -11,12 +11,38 @@ impl Render for HelloWorld {
|
|||
.bg(gpui::white())
|
||||
.flex()
|
||||
.flex_col()
|
||||
.gap_3()
|
||||
.gap_2()
|
||||
.p_4()
|
||||
.size_full()
|
||||
.child(div().child("Text left"))
|
||||
.child(div().text_center().child("Text center"))
|
||||
.child(div().text_right().child("Text right"))
|
||||
.child(div().text_decoration_1().child("Text left (underline)"))
|
||||
.child(
|
||||
div()
|
||||
.text_center()
|
||||
.text_decoration_1()
|
||||
.child("Text center (underline)"),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.text_right()
|
||||
.text_decoration_1()
|
||||
.child("Text right (underline)"),
|
||||
)
|
||||
.child(div().line_through().child("Text left (line_through)"))
|
||||
.child(
|
||||
div()
|
||||
.text_center()
|
||||
.line_through()
|
||||
.child("Text center (line_through)"),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.text_right()
|
||||
.line_through()
|
||||
.child("Text right (line_through)"),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.flex()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue