diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-26 13:49:44 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-26 13:49:44 +0200 |
| commit | a9869c212f7c1bc77a52e301ad014641b014e834 (patch) | |
| tree | 97b5d6c71940e903482ba2f30cbcedd8f1c17ea3 /src/library/layout/grid.rs | |
| parent | 66d8f4569a9f13270c5f477e0730f127a22333e2 (diff) | |
Locatable groups
Diffstat (limited to 'src/library/layout/grid.rs')
| -rw-r--r-- | src/library/layout/grid.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library/layout/grid.rs b/src/library/layout/grid.rs index 5b621732..4cad9de6 100644 --- a/src/library/layout/grid.rs +++ b/src/library/layout/grid.rs @@ -204,7 +204,9 @@ impl<'a> GridLayouter<'a> { /// Determines the columns sizes and then layouts the grid row-by-row. pub fn layout(mut self) -> TypResult<Vec<Arc<Frame>>> { + self.ctx.pins.freeze(); self.measure_columns()?; + self.ctx.pins.unfreeze(); for y in 0 .. self.rows.len() { // Skip to next region if current one is full, but only for content @@ -370,10 +372,12 @@ impl<'a> GridLayouter<'a> { pod.base.x = self.regions.base.x; } + self.ctx.pins.freeze(); let mut sizes = node .layout(self.ctx, &pod, self.styles)? .into_iter() .map(|frame| frame.size.y); + self.ctx.pins.unfreeze(); // For each region, we want to know the maximum height any // column requires. |
