From 91e512069396f1de616ec2b0fe0cd31a76e7f2e9 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 13 Oct 2020 13:51:58 +0200 Subject: =?UTF-8?q?BoxAlign=20and=20Flow=20aliases=20=E2=9C=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/text.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/layout/text.rs') diff --git a/src/layout/text.rs b/src/layout/text.rs index 0ded4f9d..fc319fa5 100644 --- a/src/layout/text.rs +++ b/src/layout/text.rs @@ -11,16 +11,16 @@ use crate::shaping; pub struct Text { /// The text. pub text: String, - /// The font size. - pub font_size: Length, + /// How to align this text node in its parent. + pub align: BoxAlign, /// The text direction. pub dir: Dir, + /// The font size. + pub font_size: Length, /// The families used for font fallback. pub families: Rc, /// The font variant, pub variant: FontVariant, - /// How to align this text node in its parent. - pub aligns: Gen, } impl Layout for Text { @@ -30,12 +30,12 @@ impl Layout for Text { shaping::shape( &mut loader, &self.text, - self.font_size, self.dir, + self.font_size, &self.families, self.variant, ), - self.aligns, + self.align, ) } } -- cgit v1.2.3