Rename Drawable::boxed to into_element and make containers generic

Multi-element are now generic over any drawable child, which can be converted
into an element.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-04-21 18:36:21 +02:00 committed by Nathan Sobo
parent 4d433663bd
commit 03619dfa55
80 changed files with 1132 additions and 1434 deletions

View file

@ -231,17 +231,16 @@ impl PickerDelegate for ProjectSymbolsDelegate {
current_style.label.text.clone().into(),
syntax_runs,
&string_match.positions,
))
.boxed(),
)),
)
.with_child(
// Avoid styling the path differently when it is selected, since
// the symbol's syntax highlighting doesn't change when selected.
Label::new(path.to_string(), style.default.label.clone()).boxed(),
Label::new(path.to_string(), style.default.label.clone()),
)
.contained()
.with_style(current_style.container)
.boxed()
.into_element()
}
}