diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-12 16:38:14 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-12 16:38:18 +0100 |
| commit | ebbee6274cafa6865a0d9123b78cae305c3c12aa (patch) | |
| tree | b3c982a5a46a3dcfc8cce642eacf252a0901f183 /library/src/visualize | |
| parent | 6260878245bdf81d7b928777e4fc1018c6651878 (diff) | |
Fix square base
Diffstat (limited to 'library/src/visualize')
| -rw-r--r-- | library/src/visualize/shape.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/src/visualize/shape.rs b/library/src/visualize/shape.rs index e6cb55f5..c0c81bf5 100644 --- a/library/src/visualize/shape.rs +++ b/library/src/visualize/shape.rs @@ -556,7 +556,7 @@ fn layout( // Pad the child. let child = child.clone().padded(inset.map(|side| side.map(Length::from))); - let mut pod = Regions::one(regions.first, regions.base, regions.expand); + let pod = Regions::one(regions.first, regions.base, regions.expand); frame = child.layout(vt, styles, pod)?.into_frame(); // Relayout with full expansion into square region to make sure @@ -571,8 +571,8 @@ fn layout( desired.min(regions.first.x).min(regions.first.y) }; - pod.first = Size::splat(length); - pod.expand = Axes::splat(true); + let size = Size::splat(length); + let pod = Regions::one(size, size, Axes::splat(true)); frame = child.layout(vt, styles, pod)?.into_frame(); } } else { |
