diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-03-11 10:48:29 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-03-11 10:48:29 +0100 |
| commit | c1b1dbcc0925ba1730fabbfbca3c8b99831c5561 (patch) | |
| tree | 6e4cb30753729c699bd899a7f2ec352e276beee8 /src/library/page.rs | |
| parent | 4e5f85aa4ac0d6b51323bb2a6e1fbd3f4f46babb (diff) | |
Better expansion behaviour 🐪
This makes expansion behaviour inheritable by placing it into the area and passing it down during layouting instead of computing some approximation of what we want during execution.
Diffstat (limited to 'src/library/page.rs')
| -rw-r--r-- | src/library/page.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/library/page.rs b/src/library/page.rs index 1fdf4d3f..4ab92b31 100644 --- a/src/library/page.rs +++ b/src/library/page.rs @@ -45,19 +45,16 @@ pub fn page(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value { if let Some(paper) = paper { ctx.state.page.class = paper.class; ctx.state.page.size = paper.size(); - ctx.state.page.expand = Spec::uniform(Expansion::Fill); } if let Some(width) = width { ctx.state.page.class = PaperClass::Custom; ctx.state.page.size.width = width; - ctx.state.page.expand.horizontal = Expansion::Fill; } if let Some(height) = height { ctx.state.page.class = PaperClass::Custom; ctx.state.page.size.height = height; - ctx.state.page.expand.vertical = Expansion::Fill; } if let Some(margins) = margins { @@ -83,7 +80,6 @@ pub fn page(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value { if flip.unwrap_or(false) { let page = &mut ctx.state.page; std::mem::swap(&mut page.size.width, &mut page.size.height); - std::mem::swap(&mut page.expand.horizontal, &mut page.expand.vertical); } ctx.set_dirs(Gen::new(main, cross)); |
