summaryrefslogtreecommitdiff
path: root/src/layout/text.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-12-01 19:18:06 +0100
committerLaurenz <laurmaedje@gmail.com>2019-12-01 19:18:38 +0100
commitace57c34206a13b4bc3885b944cc51e274f30b0f (patch)
tree2f1e1e8e4ac5c3867492d5a59c49045058e16123 /src/layout/text.rs
parent5782b82770f6923677942c3b4e2bf4f7258e47d8 (diff)
First half of stack update 🌓
Diffstat (limited to 'src/layout/text.rs')
-rw-r--r--src/layout/text.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/layout/text.rs b/src/layout/text.rs
index 3ca826ca..343127e3 100644
--- a/src/layout/text.rs
+++ b/src/layout/text.rs
@@ -11,6 +11,7 @@ use crate::size::{Size, Size2D};
pub struct TextContext<'a, 'p> {
pub loader: &'a SharedFontLoader<'p>,
pub style: &'a TextStyle,
+ pub alignment: LayoutAlignment,
}
/// Layouts text into a box.
@@ -72,6 +73,8 @@ impl<'a, 'p> TextLayouter<'a, 'p> {
Ok(Layout {
dimensions: Size2D::new(self.width, self.ctx.style.font_size),
+ baseline: None,
+ alignment: self.ctx.alignment,
actions: self.actions.to_vec(),
})
}