feat: port svg sizing to font icons

This commit is contained in:
2026-04-26 00:29:31 +01:00
parent 8b28f3d67f
commit dab18c40c5
5 changed files with 52 additions and 31 deletions

View File

@@ -443,7 +443,7 @@ fn connected_body(user: &api::user::User, cx: &gpui::Context<GithubStepView>) ->
.rounded_full()
.bg(theme.colors.accent)
.p_1()
.child(font_icon(FontIcon::Check, cx).size_4()),
.child(font_icon(FontIcon::Check).size_4()),
),
)
}

View File

@@ -88,11 +88,11 @@ impl Screen {
}
}
fn step_list(&self, cx: &gpui::Context<Self>) -> impl gpui::IntoElement {
fn step_list(&self, _cx: &gpui::Context<Self>) -> impl gpui::IntoElement {
let children: Vec<gpui::Div> = ALL_SETUP_STEPS
.iter()
.enumerate()
.map(|(i, step)| {
.map(|(i, step)| {
let label = match step {
Step::Welcome => "Welcome!",
Step::ConnectToGithub => "Connect to GitHub",
@@ -106,10 +106,7 @@ impl Screen {
.items_center()
.gap_2p5()
.child(if is_completed {
font_icon(FontIcon::Check, cx)
.size_4()
.into_any_element()
.into_any_element()
font_icon(FontIcon::Check).size_4().into_any_element()
} else {
div().size_4().into_any_element()
})