ui: Fix Divider component growing unnecessarily (#44986)

I had previously added `flex_none` to the Divider and that caused it to
grow beyond the container's width in some cases (project panel, agent
panel's restore to check point button, etc.).

Release Notes:

- N/A
This commit is contained in:
Danilo Leal authored and GitHub committed 2025-12-16 12:55:26 +00:00
1 parent 4c400ab271
commit 34356bd34b
2 files changed
+2 -4

No files matched your search

+2 -2
View File
@@ -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")
-2
View File
@@ -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()),