Change summary
crates/breadcrumbs/src/breadcrumbs.rs | 2 ++
crates/search/src/project_search.rs | 16 ++++++++++++----
crates/workspace/src/toolbar.rs | 2 ++
crates/zed/assets/themes/_base.toml | 6 ++----
4 files changed, 18 insertions(+), 8 deletions(-)
Detailed changes
@@ -77,6 +77,8 @@ impl View for Breadcrumbs {
}))
.contained()
.with_style(theme.breadcrumbs.container)
+ .aligned()
+ .left()
.boxed()
}
}
@@ -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()
@@ -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()
@@ -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"