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/exec/state.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/exec/state.rs')
| -rw-r--r-- | src/exec/state.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/exec/state.rs b/src/exec/state.rs index 416b5d08..3293662a 100644 --- a/src/exec/state.rs +++ b/src/exec/state.rs @@ -3,9 +3,8 @@ use std::rc::Rc; use fontdock::{fallback, FallbackTree, FontStretch, FontStyle, FontVariant, FontWeight}; use crate::geom::{ - Align, ChildAlign, Dir, LayoutDirs, Length, Linear, Relative, Sides, Size, Spec, + Align, ChildAlign, Dir, LayoutDirs, Length, Linear, Relative, Sides, Size, }; -use crate::layout::Expansion; use crate::paper::{Paper, PaperClass, PAPER_A4}; /// The evaluation state. @@ -42,8 +41,6 @@ pub struct PageState { pub class: PaperClass, /// The width and height of the page. pub size: Size, - /// Whether the expand the pages to the `size` or to fit the content. - pub expand: Spec<Expansion>, /// The amount of white space on each side of the page. If a side is set to /// `None`, the default for the paper class is used. pub margins: Sides<Option<Linear>>, @@ -55,7 +52,6 @@ impl PageState { Self { class: paper.class, size: paper.size(), - expand: Spec::uniform(Expansion::Fill), margins: Sides::uniform(None), } } |
