Compare commits

...

2 Commits

Author SHA1 Message Date
Nate Butler
f61e45951a Add welcome note 2025-02-10 12:42:03 -05:00
Nate Butler
bdba838b4a minimal styles to be useable 2025-02-10 12:24:43 -05:00
3 changed files with 51 additions and 17 deletions

View File

@@ -109,23 +109,57 @@ impl Item for SettingsPage {
impl Render for SettingsPage {
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
v_flex()
.p_4()
.id("settings-ui")
.overflow_y_scroll()
.bg(cx.theme().colors().editor_background)
.size_full()
.gap_4()
.child(Label::new("Settings").size(LabelSize::Large))
.items_center()
.p_8()
.child(
v_flex().gap_1().child(Label::new("Appearance")).child(
v_flex()
.elevation_2(cx)
.child(AppearanceSettingsControls::new()),
),
)
.child(
v_flex().gap_1().child(Label::new("Editor")).child(
v_flex()
.elevation_2(cx)
.child(EditorSettingsControls::new()),
),
v_flex()
.elevation_2(cx)
.p_8()
.max_w(px(800.))
.gap_4()
.child(
v_group()
.unfilled()
.gap_2()
.child(
div().max_w(px(580.)).p_1()
.child(Headline::new("Welcome to the settings UI alpha!").size(HeadlineSize::Small))
.child(Label::new("We have a lot to build, and many settings to cover.")
.italic(true).color(Color::Muted))
.child(Label::new("Help us out by giving feedback, and contributing to coverage of visual settings.")
.italic(true).color(Color::Muted)))
.child(
// TODO: Update URLs
h_flex()
.gap_3()
.child(Button::new("give-feedback", "Give Feedback")
.layer(ui::ElevationIndex::Surface)
.on_click(cx.listener(|_, _, _, cx| {
cx.open_url("https://github.com/zed-industries/zed/discussions");
})))
.child(Button::new("contribute", "Contribute")
.layer(ui::ElevationIndex::Surface)
.on_click(cx.listener(|_, _, _, cx| {
cx.open_url("https://github.com/zed-industries/zed");
})))
)
)
.child(
v_flex()
.gap_1()
.child(Headline::new("Appearance").size(HeadlineSize::Small))
.child(AppearanceSettingsControls::new()),
)
.child(
v_flex()
.gap_1()
.child(Headline::new("Editor").size(HeadlineSize::Small))
.child(EditorSettingsControls::new()),
),
)
}
}

View File

@@ -32,6 +32,6 @@ impl ParentElement for SettingsContainer {
impl RenderOnce for SettingsContainer {
fn render(self, _window: &mut Window, _cx: &mut App) -> impl IntoElement {
v_flex().px_2().gap_1().children(self.children)
v_flex().px_2().gap_3().children(self.children)
}
}

View File

@@ -29,7 +29,7 @@ impl ParentElement for SettingsGroup {
impl RenderOnce for SettingsGroup {
fn render(self, _window: &mut Window, _cx: &mut App) -> impl IntoElement {
v_flex()
v_group()
.p_1()
.gap_2()
.child(ListHeader::new(self.header))