From c1b1dbcc0925ba1730fabbfbca3c8b99831c5561 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 11 Mar 2021 10:48:29 +0100 Subject: =?UTF-8?q?Better=20expansion=20behaviour=20=F0=9F=90=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/exec/state.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/exec/state.rs') 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, /// 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>, @@ -55,7 +52,6 @@ impl PageState { Self { class: paper.class, size: paper.size(), - expand: Spec::uniform(Expansion::Fill), margins: Sides::uniform(None), } } -- cgit v1.2.3