Eliminate LayoutContext

This commit is contained in:
Nathan Sobo 2023-09-11 08:47:00 -06:00
parent ebf8b32811
commit a24d94cfda
35 changed files with 108 additions and 203 deletions

View file

@ -329,7 +329,7 @@ pub fn element_derive(input: TokenStream) -> TokenStream {
&mut self,
constraint: gpui::SizeConstraint,
view: &mut V,
cx: &mut gpui::LayoutContext<V>,
cx: &mut gpui::ViewContext<V>,
) -> (gpui::geometry::vector::Vector2F, gpui::elements::AnyElement<V>) {
let mut element = self.render(view, cx).into_any();
let size = element.layout(constraint, view, cx);