Refine naming of element-related types and traits

Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Nathan Sobo 2023-04-21 13:04:03 -06:00
parent 03619dfa55
commit fe492eacbf
93 changed files with 661 additions and 656 deletions

View file

@ -18,7 +18,7 @@ use gpui::{
impl_actions, impl_internal_actions,
keymap_matcher::{KeymapContext, Keystroke},
platform::KeyDownEvent,
AnyViewHandle, AppContext, Drawable, Element, Entity, ModelHandle, Task, View, ViewContext,
AnyElement, AnyViewHandle, AppContext, Element, Entity, ModelHandle, Task, View, ViewContext,
ViewHandle, WeakViewHandle,
};
use project::{LocalWorktree, Project};
@ -387,7 +387,7 @@ impl View for TerminalView {
"Terminal"
}
fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> Element<Self> {
fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> AnyElement<Self> {
let terminal_handle = self.terminal.clone().downgrade();
let self_id = cx.view_id();
@ -406,7 +406,7 @@ impl View for TerminalView {
.contained(),
)
.with_child(ChildView::new(&self.context_menu, cx))
.into_element()
.into_any()
}
fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
@ -549,7 +549,7 @@ impl Item for TerminalView {
_detail: Option<usize>,
tab_theme: &theme::Tab,
cx: &gpui::AppContext,
) -> Element<T> {
) -> AnyElement<T> {
let title = self.terminal().read(cx).title();
Flex::row()
@ -563,7 +563,7 @@ impl Item for TerminalView {
.with_margin_right(tab_theme.spacing),
)
.with_child(Label::new(title, tab_theme.label.clone()).aligned())
.into_element()
.into_any()
}
fn clone_on_split(