Eliminate LayoutContext
This commit is contained in:
parent
ebf8b32811
commit
a24d94cfda
35 changed files with 108 additions and 203 deletions
|
@ -594,8 +594,8 @@ mod element {
|
|||
json::{self, ToJson},
|
||||
platform::{CursorStyle, MouseButton},
|
||||
scene::MouseDrag,
|
||||
AnyElement, Axis, CursorRegion, Element, EventContext, LayoutContext, MouseRegion,
|
||||
PaintContext, RectFExt, SizeConstraint, Vector2FExt, ViewContext,
|
||||
AnyElement, Axis, CursorRegion, Element, EventContext, MouseRegion, PaintContext, RectFExt,
|
||||
SizeConstraint, Vector2FExt, ViewContext,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
@ -641,7 +641,7 @@ mod element {
|
|||
remaining_flex: &mut f32,
|
||||
cross_axis_max: &mut f32,
|
||||
view: &mut Workspace,
|
||||
cx: &mut LayoutContext<Workspace>,
|
||||
cx: &mut ViewContext<Workspace>,
|
||||
) {
|
||||
let flexes = self.flexes.borrow();
|
||||
let cross_axis = self.axis.invert();
|
||||
|
@ -789,7 +789,7 @@ mod element {
|
|||
&mut self,
|
||||
constraint: SizeConstraint,
|
||||
view: &mut Workspace,
|
||||
cx: &mut LayoutContext<Workspace>,
|
||||
cx: &mut ViewContext<Workspace>,
|
||||
) -> (Vector2F, Self::LayoutState) {
|
||||
debug_assert!(self.children.len() == self.flexes.borrow().len());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue