From c975d0d5e989cca6eff8e80ca8174f85eb4a3460 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 17 May 2021 22:55:31 +0200 Subject: Tidy up layouting code --- src/layout/fixed.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/layout/fixed.rs') diff --git a/src/layout/fixed.rs b/src/layout/fixed.rs index a42eab5a..cdd1033b 100644 --- a/src/layout/fixed.rs +++ b/src/layout/fixed.rs @@ -13,14 +13,14 @@ pub struct FixedNode { impl Layout for FixedNode { fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Vec { - let Areas { current, full, .. } = areas; + let Areas { current, base, .. } = areas; let size = Size::new( - self.width.map_or(current.width, |w| w.resolve(full.width)), - self.height.map_or(current.height, |h| h.resolve(full.height)), + self.width.map_or(current.width, |w| w.resolve(base.width)), + self.height.map_or(current.height, |h| h.resolve(base.height)), ); let fixed = Spec::new(self.width.is_some(), self.height.is_some()); - let areas = Areas::once(size, size, fixed); + let areas = Areas::once(size, fixed); self.child.layout(ctx, &areas) } } -- cgit v1.2.3