summaryrefslogtreecommitdiff
path: root/src/layout/fixed.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-05-17 22:55:31 +0200
committerLaurenz <laurmaedje@gmail.com>2021-05-17 22:55:31 +0200
commitc975d0d5e989cca6eff8e80ca8174f85eb4a3460 (patch)
tree7aaf68ee71d81a1d71d7dcb1f928659bc6fa975d /src/layout/fixed.rs
parent24c4a746bc68874f2d1b0d1b726596930acaadcf (diff)
Tidy up layouting code
Diffstat (limited to 'src/layout/fixed.rs')
-rw-r--r--src/layout/fixed.rs8
1 files changed, 4 insertions, 4 deletions
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<Frame> {
- 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)
}
}