diff options
| author | Martin Haug <mhaug@live.de> | 2021-06-27 18:57:08 +0200 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2021-06-27 18:58:31 +0200 |
| commit | e9960b89424ab67e633076ccc9f8c420316b076a (patch) | |
| tree | cdc2130d8b4265c52863f10418842d188afb63e8 /src/layout/par.rs | |
| parent | 6f518c172805b6ac067a692eb8971c7ec1e50608 (diff) | |
Code review: Reverse temperature
Diffstat (limited to 'src/layout/par.rs')
| -rw-r--r-- | src/layout/par.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/layout/par.rs b/src/layout/par.rs index 504981e6..45eefe29 100644 --- a/src/layout/par.rs +++ b/src/layout/par.rs @@ -217,9 +217,11 @@ impl<'a> ParLayouter<'a> { // Again, the line must not fit. It would if the space taken up // plus the line height would fit, therefore the constraint // below. - stack.constraints.max.vertical.set_min( - stack.full.height - stack.regions.current.height + line.size.height, - ); + stack + .constraints + .max + .vertical + .set_min(stack.size.height + line.size.height); stack.finish_region(ctx); } @@ -230,9 +232,11 @@ impl<'a> ParLayouter<'a> { break; } - stack.constraints.max.vertical.set_min( - stack.full.height - stack.regions.current.height + line.size.height, - ); + stack + .constraints + .max + .vertical + .set_min(stack.size.height + line.size.height); stack.finish_region(ctx); } // If the line does not fit horizontally or we have a mandatory |
