diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-06-22 12:51:06 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-06-22 12:51:06 +0200 |
| commit | c7ee2b393a369325b3578557e045f2ff94ceab8f (patch) | |
| tree | 063e371b764b119e378644817cc556c397ebd9dd /src/layout/boxed.rs | |
| parent | f6fe3b5cdd2805f3975985752f9cb0e04e3daf49 (diff) | |
Fix top-left text alignment 📐
Diffstat (limited to 'src/layout/boxed.rs')
| -rw-r--r-- | src/layout/boxed.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/layout/boxed.rs b/src/layout/boxed.rs index e712f650..15af278a 100644 --- a/src/layout/boxed.rs +++ b/src/layout/boxed.rs @@ -1,6 +1,6 @@ //! Block-style layouting of boxes. -use crate::doc::{Document, Page, TextAction}; +use crate::doc::{Document, Page, LayoutAction}; use crate::font::Font; use crate::size::{Size, Size2D}; use super::{ActionList, LayoutSpace, LayoutResult, LayoutError}; @@ -12,7 +12,7 @@ pub struct BoxLayout { /// The size of the box. pub dimensions: Size2D, /// The actions composing this layout. - pub actions: Vec<TextAction>, + pub actions: Vec<LayoutAction>, } impl BoxLayout { @@ -90,7 +90,7 @@ impl BoxLayouter { pub fn add_box_absolute(&mut self, position: Size2D, layout: BoxLayout) { // Move all actions into this layout and translate absolute positions. self.actions.reset_origin(); - self.actions.add(TextAction::MoveAbsolute(position)); + self.actions.add(LayoutAction::MoveAbsolute(position)); self.actions.set_origin(position); self.actions.extend(layout.actions); } |
