From 584a43277dbfbdba834a2681afe63d10598db3f9 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 12 Mar 2021 14:12:30 +0100 Subject: =?UTF-8?q?Rename=20ChildAlign=20to=20LayoutAligns=20=E2=9C=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/exec/state.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/exec/state.rs') diff --git a/src/exec/state.rs b/src/exec/state.rs index 3293662a..65f26439 100644 --- a/src/exec/state.rs +++ b/src/exec/state.rs @@ -3,33 +3,33 @@ use std::rc::Rc; use fontdock::{fallback, FallbackTree, FontStretch, FontStyle, FontVariant, FontWeight}; use crate::geom::{ - Align, ChildAlign, Dir, LayoutDirs, Length, Linear, Relative, Sides, Size, + Align, Dir, LayoutAligns, LayoutDirs, Length, Linear, Relative, Sides, Size, }; use crate::paper::{Paper, PaperClass, PAPER_A4}; /// The evaluation state. #[derive(Debug, Clone, PartialEq)] pub struct State { + /// The current directions along which layouts are placed in their parents. + pub dirs: LayoutDirs, + /// The current alignments of layouts in their parents. + pub aligns: LayoutAligns, /// The current page settings. pub page: PageState, /// The current paragraph settings. pub par: ParState, /// The current font settings. pub font: FontState, - /// The current layouting directions. - pub dirs: LayoutDirs, - /// The current alignments of an item in its parent. - pub align: ChildAlign, } impl Default for State { fn default() -> Self { Self { + dirs: LayoutDirs::new(Dir::TTB, Dir::LTR), + aligns: LayoutAligns::new(Align::Start, Align::Start), page: PageState::default(), par: ParState::default(), font: FontState::default(), - dirs: LayoutDirs::new(Dir::TTB, Dir::LTR), - align: ChildAlign::new(Align::Start, Align::Start), } } } -- cgit v1.2.3