onboarding: Adjust the welcome page a bit (#35600)
Release Notes: - N/A
This commit is contained in:
parent
1325bf1420
commit
6e77c6a5ef
1 changed files with 11 additions and 10 deletions
|
@ -87,18 +87,18 @@ impl<const COLS: usize> Section<COLS> {
|
||||||
) -> impl IntoElement {
|
) -> impl IntoElement {
|
||||||
v_flex()
|
v_flex()
|
||||||
.min_w_full()
|
.min_w_full()
|
||||||
.gap_2()
|
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.px_1()
|
.px_1()
|
||||||
.gap_4()
|
.mb_2()
|
||||||
|
.gap_2()
|
||||||
.child(
|
.child(
|
||||||
Label::new(self.title.to_ascii_uppercase())
|
Label::new(self.title.to_ascii_uppercase())
|
||||||
.buffer_font(cx)
|
.buffer_font(cx)
|
||||||
.color(Color::Muted)
|
.color(Color::Muted)
|
||||||
.size(LabelSize::XSmall),
|
.size(LabelSize::XSmall),
|
||||||
)
|
)
|
||||||
.child(Divider::horizontal().color(DividerColor::Border)),
|
.child(Divider::horizontal().color(DividerColor::BorderVariant)),
|
||||||
)
|
)
|
||||||
.children(
|
.children(
|
||||||
self.entries
|
self.entries
|
||||||
|
@ -125,10 +125,10 @@ impl SectionEntry {
|
||||||
) -> impl IntoElement {
|
) -> impl IntoElement {
|
||||||
ButtonLike::new(("onboarding-button-id", button_index))
|
ButtonLike::new(("onboarding-button-id", button_index))
|
||||||
.full_width()
|
.full_width()
|
||||||
|
.size(ButtonSize::Medium)
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.w_full()
|
.w_full()
|
||||||
.gap_1()
|
|
||||||
.justify_between()
|
.justify_between()
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
|
@ -140,7 +140,10 @@ impl SectionEntry {
|
||||||
)
|
)
|
||||||
.child(Label::new(self.title)),
|
.child(Label::new(self.title)),
|
||||||
)
|
)
|
||||||
.children(KeyBinding::for_action_in(self.action, focus, window, cx)),
|
.children(
|
||||||
|
KeyBinding::for_action_in(self.action, focus, window, cx)
|
||||||
|
.map(|s| s.size(rems_from_px(12.))),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.on_click(|_, window, cx| window.dispatch_action(self.action.boxed_clone(), cx))
|
.on_click(|_, window, cx| window.dispatch_action(self.action.boxed_clone(), cx))
|
||||||
}
|
}
|
||||||
|
@ -191,8 +194,8 @@ impl Render for WelcomePage {
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
v_flex()
|
v_flex()
|
||||||
.mt_12()
|
.mt_10()
|
||||||
.gap_8()
|
.gap_6()
|
||||||
.child(first_section.render(
|
.child(first_section.render(
|
||||||
Default::default(),
|
Default::default(),
|
||||||
&self.focus_handle,
|
&self.focus_handle,
|
||||||
|
@ -213,10 +216,9 @@ impl Render for WelcomePage {
|
||||||
// We call this a hack
|
// We call this a hack
|
||||||
.rounded_b_xs()
|
.rounded_b_xs()
|
||||||
.border_t_1()
|
.border_t_1()
|
||||||
.border_color(DividerColor::Border.hsla(cx))
|
.border_color(cx.theme().colors().border.opacity(0.6))
|
||||||
.border_dashed()
|
.border_dashed()
|
||||||
.child(
|
.child(
|
||||||
div().child(
|
|
||||||
Button::new("welcome-exit", "Return to Setup")
|
Button::new("welcome-exit", "Return to Setup")
|
||||||
.full_width()
|
.full_width()
|
||||||
.label_size(LabelSize::XSmall)
|
.label_size(LabelSize::XSmall)
|
||||||
|
@ -278,7 +280,6 @@ impl Render for WelcomePage {
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue