From 463e4ebd8234da5e28700e9b22b6ef5f0dfef56f Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 13 Oct 2019 12:08:07 +0200 Subject: =?UTF-8?q?Refactor=20layout=20types=20=F0=9F=9A=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/text.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/layout/text.rs') diff --git a/src/layout/text.rs b/src/layout/text.rs index ecec0220..6cbe3b8e 100644 --- a/src/layout/text.rs +++ b/src/layout/text.rs @@ -17,7 +17,7 @@ pub struct TextContext<'a, 'p> { } /// Layout one piece of text without any breaks as one continous box. -pub fn layout(text: &str, ctx: TextContext) -> LayoutResult { +pub fn layout_text(text: &str, ctx: TextContext) -> LayoutResult { let mut loader = ctx.loader.borrow_mut(); let mut actions = Vec::new(); @@ -88,7 +88,7 @@ pub fn layout(text: &str, ctx: TextContext) -> LayoutResult { actions.push(LayoutAction::WriteText(buffer)); } - Ok(BoxLayout { + Ok(Layout { dimensions: Size2D::new(width, Size::pt(ctx.style.font_size)), actions, debug_render: false, -- cgit v1.2.3