Remove after_layout from Element trait

Now that layout takes a MutableAppContext we don't need an after_layout phase.
This commit is contained in:
Nathan Sobo
2021-08-20 16:40:45 -06:00
parent d0a5bc694c
commit d68e0b0b97
18 changed files with 22 additions and 191 deletions
+2 -13
View File
@@ -1,8 +1,8 @@
use crate::{
geometry::{rect::RectF, vector::Vector2F},
json::{self, json, ToJson},
AfterLayoutContext, DebugContext, Element, ElementBox, Event, EventContext, LayoutContext,
PaintContext, SizeConstraint,
DebugContext, Element, ElementBox, Event, EventContext, LayoutContext, PaintContext,
SizeConstraint,
};
pub struct Stack {
@@ -33,17 +33,6 @@ impl Element for Stack {
(size, ())
}
fn after_layout(
&mut self,
_: Vector2F,
_: &mut Self::LayoutState,
cx: &mut AfterLayoutContext,
) {
for child in &mut self.children {
child.after_layout(cx);
}
}
fn paint(
&mut self,
bounds: RectF,