diff --git a/crates/breadcrumbs/src/breadcrumbs.rs b/crates/breadcrumbs/src/breadcrumbs.rs index 9fd67034f4..94b8a4459e 100644 --- a/crates/breadcrumbs/src/breadcrumbs.rs +++ b/crates/breadcrumbs/src/breadcrumbs.rs @@ -77,6 +77,8 @@ impl View for Breadcrumbs { })) .contained() .with_style(theme.breadcrumbs.container) + .aligned() + .left() .boxed() } } diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index 7026ac3473..7fb7036576 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -691,7 +691,13 @@ impl View for ProjectSearchBar { Flex::row() .with_child( Flex::row() - .with_child(ChildView::new(&search.query_editor).flex(1., true).boxed()) + .with_child( + ChildView::new(&search.query_editor) + .aligned() + .left() + .flex(1., true) + .boxed(), + ) .with_children(search.active_match_index.map(|match_ix| { Label::new( format!( @@ -710,7 +716,9 @@ impl View for ProjectSearchBar { .with_style(editor_container) .aligned() .constrained() + .with_min_width(theme.search.editor.min_width) .with_max_width(theme.search.editor.max_width) + .flex(1., false) .boxed(), ) .with_child( @@ -735,9 +743,9 @@ impl View for ProjectSearchBar { .boxed(), ) .contained() - .with_style(theme.workspace.toolbar.container) - .constrained() - .with_height(theme.workspace.toolbar.height) + .with_style(theme.search.container) + .aligned() + .left() .named("project search") } else { Empty::new().boxed() diff --git a/crates/workspace/src/toolbar.rs b/crates/workspace/src/toolbar.rs index f15d1e1c75..06a4f6440b 100644 --- a/crates/workspace/src/toolbar.rs +++ b/crates/workspace/src/toolbar.rs @@ -76,6 +76,7 @@ impl View for Toolbar { .aligned() .contained() .with_margin_right(theme.item_spacing) + .flex(1., false) .boxed() })) .with_children(primary_right_items.iter().map(|i| { @@ -84,6 +85,7 @@ impl View for Toolbar { .contained() .with_margin_left(theme.item_spacing) .flex_float() + .flex(1., false) .boxed() })) .constrained() diff --git a/crates/zed/assets/themes/_base.toml b/crates/zed/assets/themes/_base.toml index d5b25cbe1a..7f235cbf48 100644 --- a/crates/zed/assets/themes/_base.toml +++ b/crates/zed/assets/themes/_base.toml @@ -89,9 +89,7 @@ background = "$surface.1" border = { color = "$border.0", width = 1, left = false, right = false, bottom = true, top = false } height = 34 item_spacing = 8 -padding.left = 16 -padding.right = 8 -padding.bottom = 4 +padding = { left = 16, right = 8, top = 4, bottom = 4 } [breadcrumbs] extends = "$text.1" @@ -406,7 +404,7 @@ margin = { right = 5 } text = "$text.0" placeholder_text = "$text.2" selection = "$selection.host" -border = { width = 1, color = "$border.0", overlay = true } +border = { width = 1, color = "$border.0" } [search.invalid_editor] extends = "$search.editor"