diff --git a/ui-gpui/src/components/project_box_element.rs b/ui-gpui/src/components/project_box_element.rs index 8e4f937..e96ef88 100644 --- a/ui-gpui/src/components/project_box_element.rs +++ b/ui-gpui/src/components/project_box_element.rs @@ -224,12 +224,14 @@ impl Element for ProjectBoxFullElement { std::mem::swap(&mut content, &mut self.content); let child_id = content.request_layout(window, cx); - // Root style: fill parent, flex-col (chrome occupies fixed top portion via paint). + // Root style: flex-1 with min constraints (allows 2 boxes side-by-side in flex-wrap grid). let style = Style { - size: size(relative(1.0).into(), relative(1.0).into()), + flex_grow: 1.0, flex_shrink: 0.0, + min_size: size(px(400.0).into(), px(300.0).into()), display: Display::Flex, flex_direction: FlexDirection::Column, + overflow: Point { x: Overflow::Hidden, y: Overflow::Hidden }, ..Style::default() }; (window.request_layout(style, [child_id], cx), content) @@ -259,6 +261,15 @@ impl Element for ProjectBoxFullElement { window: &mut Window, cx: &mut App, ) { + // 0. Card background + border (rounded rect) + window.paint_quad(PaintQuad { + bounds, + corner_radii: Corners::all(px(8.0)), + background: theme::BASE.into(), + border_widths: Edges::all(px(1.0)), + border_color: theme::SURFACE0.into(), + border_style: BorderStyle::default(), + }); // 1. Paint header + tabs directly. paint_chrome(bounds, &self.name, &self.cwd, self.accent, self.status, &self.blink_visible, self.active_tab, window, cx);