diff options
| author | Martin Haug <mhaug@live.de> | 2022-04-30 21:59:34 +0200 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2022-05-01 11:50:34 +0200 |
| commit | 5f1499d380e223e7e1b2a8a96eb99e3ec95a56ac (patch) | |
| tree | 44945bc35618c9ce10380016200309e42c2b5ed4 /src/model/layout.rs | |
| parent | f9e115daf54c29358f890b137f50a33a781af680 (diff) | |
Add round corners and change arguments
Diffstat (limited to 'src/model/layout.rs')
| -rw-r--r-- | src/model/layout.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/model/layout.rs b/src/model/layout.rs index 51154286..63e8f088 100644 --- a/src/model/layout.rs +++ b/src/model/layout.rs @@ -353,7 +353,8 @@ 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, Sides::splat(Length::zero())) + .filled(self.fill); Arc::make_mut(frame).prepend(Point::zero(), Element::Shape(shape)); } Ok(frames) @@ -378,7 +379,8 @@ 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, Sides::splat(Length::zero())) + .stroked(self.stroke); Arc::make_mut(frame).prepend(Point::zero(), Element::Shape(shape)); } Ok(frames) |
