From 89f2e71852e96062ea9b756bf92fbf4e894871b1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 17 Nov 2021 17:09:19 +0100 Subject: Align node --- src/style/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/style') diff --git a/src/style/mod.rs b/src/style/mod.rs index c2a92568..9cf2de07 100644 --- a/src/style/mod.rs +++ b/src/style/mod.rs @@ -16,8 +16,6 @@ use crate::util::EcoString; /// Defines a set of properties a template can be instantiated with. #[derive(Debug, Clone, Eq, PartialEq, Hash)] pub struct Style { - /// The alignments of layouts in their parents. - pub aligns: Gen, /// The page settings. pub page: Rc, /// The paragraph settings. @@ -56,7 +54,6 @@ impl Style { impl Default for Style { fn default() -> Self { Self { - aligns: Gen::splat(Align::Start), page: Rc::new(PageStyle::default()), par: Rc::new(ParStyle::default()), text: Rc::new(TextStyle::default()), @@ -103,8 +100,10 @@ impl Default for PageStyle { /// Defines style properties of paragraphs. #[derive(Debug, Clone, Eq, PartialEq, Hash)] pub struct ParStyle { - /// The direction for text and other inline objects. + /// The direction for text and inline objects. pub dir: Dir, + /// How to align text and inline objects in their line. + pub align: Align, /// The spacing between lines (dependent on scaled font size). pub leading: Linear, /// The spacing between paragraphs (dependent on scaled font size). @@ -115,6 +114,7 @@ impl Default for ParStyle { fn default() -> Self { Self { dir: Dir::LTR, + align: Align::Left, leading: Relative::new(0.65).into(), spacing: Relative::new(1.2).into(), } -- cgit v1.2.3