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

@ -254,19 +254,15 @@ impl PickerDelegate for FileFinderDelegate {
self.labels_for_match(path_match);
Flex::column()
.with_child(
Label::new(file_name, style.label.clone())
.with_highlights(file_name_positions)
.boxed(),
Label::new(file_name, style.label.clone()).with_highlights(file_name_positions),
)
.with_child(
Label::new(full_path, style.label.clone())
.with_highlights(full_path_positions)
.boxed(),
Label::new(full_path, style.label.clone()).with_highlights(full_path_positions),
)
.flex(1., false)
.contained()
.with_style(style.container)
.named("match")
.into_named_element("match")
}
}