Refine naming of element-related types and traits
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
03619dfa55
commit
fe492eacbf
93 changed files with 661 additions and 656 deletions
|
@ -41,10 +41,10 @@ impl View for Breadcrumbs {
|
|||
"Breadcrumbs"
|
||||
}
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Element<Self> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> AnyElement<Self> {
|
||||
let active_item = match &self.active_item {
|
||||
Some(active_item) => active_item,
|
||||
None => return Empty::new().into_element(),
|
||||
None => return Empty::new().into_any(),
|
||||
};
|
||||
let not_editor = active_item.downcast::<editor::Editor>().is_none();
|
||||
|
||||
|
@ -53,7 +53,7 @@ impl View for Breadcrumbs {
|
|||
|
||||
let breadcrumbs = match active_item.breadcrumbs(&theme, cx) {
|
||||
Some(breadcrumbs) => breadcrumbs,
|
||||
None => return Empty::new().into_element(),
|
||||
None => return Empty::new().into_any(),
|
||||
}
|
||||
.into_iter()
|
||||
.map(|breadcrumb| {
|
||||
|
@ -62,12 +62,12 @@ impl View for Breadcrumbs {
|
|||
theme.workspace.breadcrumbs.default.text.clone(),
|
||||
)
|
||||
.with_highlights(breadcrumb.highlights.unwrap_or_default())
|
||||
.into_element()
|
||||
.into_any()
|
||||
});
|
||||
|
||||
let crumbs = Flex::row()
|
||||
.with_children(Itertools::intersperse_with(breadcrumbs, || {
|
||||
Label::new(" 〉 ", style.default.text.clone()).into_element()
|
||||
Label::new(" 〉 ", style.default.text.clone()).into_any()
|
||||
}))
|
||||
.constrained()
|
||||
.with_height(theme.workspace.breadcrumb_height)
|
||||
|
@ -78,7 +78,7 @@ impl View for Breadcrumbs {
|
|||
.with_style(style.default.container)
|
||||
.aligned()
|
||||
.left()
|
||||
.into_element();
|
||||
.into_any();
|
||||
}
|
||||
|
||||
MouseEventHandler::<Breadcrumbs, Breadcrumbs>::new(0, cx, |state, _| {
|
||||
|
@ -97,7 +97,7 @@ impl View for Breadcrumbs {
|
|||
)
|
||||
.aligned()
|
||||
.left()
|
||||
.into_element()
|
||||
.into_any()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue