diff options
Diffstat (limited to 'src/layout/text.rs')
| -rw-r--r-- | src/layout/text.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/layout/text.rs b/src/layout/text.rs index 8aa76c4c..0a0241a0 100644 --- a/src/layout/text.rs +++ b/src/layout/text.rs @@ -1,6 +1,6 @@ //! Layouting of text into boxes. -use crate::doc::TextAction; +use crate::doc::LayoutAction; use crate::font::FontQuery; use crate::size::{Size, Size2D}; use super::*; @@ -39,11 +39,11 @@ pub fn layout(text: &str, ctx: &TextContext) -> LayoutResult<BoxLayout> { // Change the font if necessary. if active_font != index { if !buffer.is_empty() { - actions.push(TextAction::WriteText(buffer)); + actions.push(LayoutAction::WriteText(buffer)); buffer = String::new(); } - actions.push(TextAction::SetFont(index, ctx.style.font_size)); + actions.push(LayoutAction::SetFont(index, ctx.style.font_size)); active_font = index; } @@ -52,11 +52,11 @@ pub fn layout(text: &str, ctx: &TextContext) -> LayoutResult<BoxLayout> { // Write the remaining characters. if !buffer.is_empty() { - actions.push(TextAction::WriteText(buffer)); + actions.push(LayoutAction::WriteText(buffer)); } Ok(BoxLayout { - dimensions: Size2D::new(width, Size::points(ctx.style.font_size)), + dimensions: Size2D::new(width, Size::pt(ctx.style.font_size)), actions, }) } |
