From 264a7dedd42e27cd9e604037640cf0594b2ec46b Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 19 Mar 2021 17:57:31 +0100 Subject: =?UTF-8?q?Scheduled=20maintenance=20=F0=9F=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New naming scheme - TextNode instead of NodeText - CallExpr instead of ExprCall - ... - Less glob imports - Removes Value::Args variant - Removes prelude - Renames Layouted to Fragment - Moves font into env - Moves shaping into layout - Moves frame into separate module --- src/layout/fixed.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/layout/fixed.rs') diff --git a/src/layout/fixed.rs b/src/layout/fixed.rs index a9554a07..e3365668 100644 --- a/src/layout/fixed.rs +++ b/src/layout/fixed.rs @@ -1,9 +1,8 @@ use super::*; -use crate::geom::Linear; /// A node that can fix its child's width and height. #[derive(Debug, Clone, PartialEq)] -pub struct NodeFixed { +pub struct FixedNode { /// The fixed width, if any. pub width: Option, /// The fixed height, if any. @@ -12,8 +11,8 @@ pub struct NodeFixed { pub child: Node, } -impl Layout for NodeFixed { - fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Layouted { +impl Layout for FixedNode { + fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Fragment { let Areas { current, full, .. } = areas; let size = Size::new( self.width.map(|w| w.resolve(full.width)).unwrap_or(current.width), @@ -31,8 +30,8 @@ impl Layout for NodeFixed { } } -impl From for NodeAny { - fn from(fixed: NodeFixed) -> Self { +impl From for AnyNode { + fn from(fixed: FixedNode) -> Self { Self::new(fixed) } } -- cgit v1.2.3