summaryrefslogtreecommitdiff
path: root/src/model/layout.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-06-12 17:16:14 +0200
committerLaurenz <laurmaedje@gmail.com>2022-06-12 17:26:18 +0200
commit6e3b1a2c80428d581d00b9d65e1c45401df2e210 (patch)
tree34d4b1c200851aa77af66b737bfe445e2da11f44 /src/model/layout.rs
parented6550fdb08eae92bffab6b6b137b1e0eebf62c6 (diff)
Make all fields of `Frame` private
Diffstat (limited to 'src/model/layout.rs')
-rw-r--r--src/model/layout.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/model/layout.rs b/src/model/layout.rs
index d8cf1cab..c971197a 100644
--- a/src/model/layout.rs
+++ b/src/model/layout.rs
@@ -366,7 +366,7 @@ impl Layout for SizedNode {
// Ensure frame size matches regions size if expansion is on.
let frame = &mut frames[0];
- let target = regions.expand.select(regions.first, frame.size);
+ let target = regions.expand.select(regions.first, frame.size());
Arc::make_mut(frame).resize(target, Align::LEFT_TOP);
Ok(frames)
@@ -391,7 +391,7 @@ impl Layout for FillNode {
) -> TypResult<Vec<Arc<Frame>>> {
let mut frames = self.child.layout(ctx, regions, styles)?;
for frame in &mut frames {
- let shape = Geometry::Rect(frame.size).filled(self.fill);
+ let shape = Geometry::Rect(frame.size()).filled(self.fill);
Arc::make_mut(frame).prepend(Point::zero(), Element::Shape(shape));
}
Ok(frames)
@@ -416,7 +416,7 @@ impl Layout for StrokeNode {
) -> TypResult<Vec<Arc<Frame>>> {
let mut frames = self.child.layout(ctx, regions, styles)?;
for frame in &mut frames {
- let shape = Geometry::Rect(frame.size).stroked(self.stroke);
+ let shape = Geometry::Rect(frame.size()).stroked(self.stroke);
Arc::make_mut(frame).prepend(Point::zero(), Element::Shape(shape));
}
Ok(frames)