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

@ -2,7 +2,7 @@ use gpui::{
color::Color,
fonts::{Properties, Weight},
text_layout::RunStyle,
Drawable, Element, Quad, SceneBuilder, View, ViewContext,
AnyElement, Element, Quad, SceneBuilder, View, ViewContext,
};
use log::LevelFilter;
use pathfinder_geometry::rect::RectF;
@ -30,12 +30,12 @@ impl gpui::View for TextView {
"View"
}
fn render(&mut self, _: &mut gpui::ViewContext<Self>) -> Element<TextView> {
TextElement.into_element()
fn render(&mut self, _: &mut gpui::ViewContext<Self>) -> AnyElement<TextView> {
TextElement.into_any()
}
}
impl<V: View> Drawable<V> for TextElement {
impl<V: View> Element<V> for TextElement {
type LayoutState = ();
type PaintState = ();