Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ui: Fix Divider component growing unnecessarily (#44986)
Danilo Leal775548e93c2f
diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rsindex a645ae194b1..ea667ecbb47 100644--- a/crates/project_panel/src/project_panel.rs+++ b/crates/project_panel/src/project_panel.rs@@ -6050,9 +6050,9 @@ impl Render for ProjectPanel {h_flex().w_1_2().gap_2()- .child(div().flex_1().child(Divider::horizontal()))+ .child(Divider::horizontal()).child(Label::new("or").size(LabelSize::XSmall).color(Color::Muted))- .child(div().flex_1().child(Divider::horizontal())),+ .child(Divider::horizontal()),).child(Button::new("clone_repo", "Clone Repository")diff --git a/crates/ui/src/components/divider.rs b/crates/ui/src/components/divider.rsindex cc7ad19875d..5ad2187cfae 100644--- a/crates/ui/src/components/divider.rs+++ b/crates/ui/src/components/divider.rs@@ -146,13 +146,11 @@ impl RenderOnce for Divider {let base = match self.direction {DividerDirection::Horizontal => div().min_w_0()- .flex_none().h_px().w_full().when(self.inset, |this| this.mx_1p5()),DividerDirection::Vertical => div().min_w_0()- .flex_none().w_px().h_full().when(self.inset, |this| this.my_1p5()),