mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-20 02:47:34 +03:00
Use when_else()
This commit is contained in:
parent
8fc15c05c5
commit
ee45db8a78
@ -98,10 +98,11 @@ impl RenderOnce for Key {
|
||||
|
||||
div()
|
||||
.py_0()
|
||||
.when(single_char, |el| {
|
||||
el.w(rems(14. / 16.)).flex().flex_none().justify_center()
|
||||
})
|
||||
.when(!single_char, |el| el.px_0p5())
|
||||
.when_else(
|
||||
single_char,
|
||||
|el| el.w(rems(14. / 16.)).flex().flex_none().justify_center(),
|
||||
|el| el.px_0p5(),
|
||||
)
|
||||
.h(rems(14. / 16.))
|
||||
.text_ui()
|
||||
.line_height(relative(1.))
|
||||
|
Loading…
Reference in New Issue
Block a user