Allow flex items to float to the end of the flex axis
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
621e67bca7
commit
0453dd1101
@@ -82,11 +82,7 @@ impl View for BufferSearchBar {
|
||||
Flex::row()
|
||||
.with_child(
|
||||
Flex::row()
|
||||
.with_child(
|
||||
ChildView::new(&self.query_editor)
|
||||
.flexible(1., true)
|
||||
.boxed(),
|
||||
)
|
||||
.with_child(ChildView::new(&self.query_editor).flex(1., true).boxed())
|
||||
.with_children(self.active_editor.as_ref().and_then(|editor| {
|
||||
let matches = self.editors_with_matches.get(&editor.downgrade())?;
|
||||
let message = if let Some(match_ix) = self.active_match_index {
|
||||
|
||||
@@ -164,12 +164,10 @@ impl View for ProjectSearchView {
|
||||
.aligned()
|
||||
.contained()
|
||||
.with_background_color(theme.editor.background)
|
||||
.flexible(1., true)
|
||||
.flex(1., true)
|
||||
.boxed()
|
||||
} else {
|
||||
ChildView::new(&self.results_editor)
|
||||
.flexible(1., true)
|
||||
.boxed()
|
||||
ChildView::new(&self.results_editor).flex(1., true).boxed()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -691,11 +689,7 @@ impl View for ProjectSearchBar {
|
||||
Flex::row()
|
||||
.with_child(
|
||||
Flex::row()
|
||||
.with_child(
|
||||
ChildView::new(&search.query_editor)
|
||||
.flexible(1., true)
|
||||
.boxed(),
|
||||
)
|
||||
.with_child(ChildView::new(&search.query_editor).flex(1., true).boxed())
|
||||
.with_children(search.active_match_index.map(|match_ix| {
|
||||
Label::new(
|
||||
format!(
|
||||
|
||||
Reference in New Issue
Block a user