Let toolbar items specify flex when they have a primary location

This commit is contained in:
Antonio Scandurra
2022-04-01 10:55:38 +02:00
parent 6d4c748d82
commit cd5389b4d8
3 changed files with 42 additions and 32 deletions
+3 -1
View File
@@ -769,7 +769,9 @@ impl ToolbarItemView for ProjectSearchBar {
if let Some(search) = active_pane_item.and_then(|i| i.downcast::<ProjectSearchView>()) {
self.subscription = Some(cx.observe(&search, |_, _, cx| cx.notify()));
self.active_project_search = Some(search);
ToolbarItemLocation::PrimaryLeft
ToolbarItemLocation::PrimaryLeft {
flex: Some((1., false)),
}
} else {
ToolbarItemLocation::Hidden
}