diff --git a/gpui/src/elements/container.rs b/gpui/src/elements/container.rs index 13a80848c4..83b3e820e3 100644 --- a/gpui/src/elements/container.rs +++ b/gpui/src/elements/container.rs @@ -36,6 +36,11 @@ impl Container { self } + pub fn with_margin_left(mut self, margin: f32) -> Self { + self.margin.left = margin; + self + } + pub fn with_uniform_padding(mut self, padding: f32) -> Self { self.padding = Padding { top: padding, diff --git a/zed/src/workspace/pane.rs b/zed/src/workspace/pane.rs index 15c8195d31..845fa0c4a7 100644 --- a/zed/src/workspace/pane.rs +++ b/zed/src/workspace/pane.rs @@ -196,16 +196,11 @@ impl Pane { Align::new( Flex::row() .with_child( - Expanded::new( - 1.0, - Label::new(title, settings.ui_font_family, settings.ui_font_size) - .boxed(), - ) - .boxed(), + Label::new(title, settings.ui_font_family, settings.ui_font_size) + .boxed(), ) .with_child( - Expanded::new( - 1.0, + Container::new( LineBox::new( settings.ui_font_family, settings.ui_font_size, @@ -217,6 +212,7 @@ impl Pane { ) .boxed(), ) + .with_margin_left(20.) .boxed(), ) .boxed(),