onboarding: Use a picker for the font dropdowns (#35638)

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-08-05 11:38:08 -03:00 committed by GitHub
parent 351e8c4cd9
commit 5940ed979f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 272 additions and 76 deletions

View file

@ -276,25 +276,25 @@ impl RenderOnce for DropdownMenuTrigger {
.gap_2()
.justify_between()
.rounded_sm()
.bg(style.bg)
.hover(|s| s.bg(cx.theme().colors().element_hover))
.map(|this| {
if self.full_width {
this.w_full()
} else {
this.flex_none().w_auto()
}
})
.when(is_outlined, |this| {
this.border_1()
.border_color(cx.theme().colors().border)
.overflow_hidden()
})
.map(|el| {
if self.full_width {
el.w_full()
} else {
el.flex_none().w_auto()
}
})
.map(|el| {
.map(|this| {
if disabled {
el.cursor_not_allowed()
this.cursor_not_allowed()
.bg(cx.theme().colors().element_disabled)
} else {
el.cursor_pointer()
this.bg(style.bg)
.hover(|s| s.bg(cx.theme().colors().element_hover))
}
})
.child(match self.label {

View file

@ -96,7 +96,7 @@ impl RenderOnce for NumericStepper {
this.overflow_hidden()
.bg(cx.theme().colors().surface_background)
.border_1()
.border_color(cx.theme().colors().border)
.border_color(cx.theme().colors().border_variant)
} else {
this.px_1().bg(cx.theme().colors().editor_background)
}
@ -111,7 +111,7 @@ impl RenderOnce for NumericStepper {
.justify_center()
.hover(|s| s.bg(cx.theme().colors().element_hover))
.border_r_1()
.border_color(cx.theme().colors().border)
.border_color(cx.theme().colors().border_variant)
.child(Icon::new(IconName::Dash).size(IconSize::Small))
.on_click(self.on_decrement),
)
@ -124,7 +124,6 @@ impl RenderOnce for NumericStepper {
)
}
})
.when(is_outlined, |this| this)
.child(Label::new(self.value).mx_3())
.map(|increment| {
if is_outlined {
@ -136,7 +135,7 @@ impl RenderOnce for NumericStepper {
.justify_center()
.hover(|s| s.bg(cx.theme().colors().element_hover))
.border_l_1()
.border_color(cx.theme().colors().border)
.border_color(cx.theme().colors().border_variant)
.child(Icon::new(IconName::Plus).size(IconSize::Small))
.on_click(self.on_increment),
)