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/pad.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/layout/pad.rs') diff --git a/src/layout/pad.rs b/src/layout/pad.rs index 88ef8828..33ce217d 100644 --- a/src/layout/pad.rs +++ b/src/layout/pad.rs @@ -1,17 +1,16 @@ use super::*; -use crate::geom::Linear; /// A node that adds padding to its child. #[derive(Debug, Clone, PartialEq)] -pub struct NodePad { +pub struct PadNode { /// The amount of padding. pub padding: Sides, /// The child node whose sides to pad. pub child: Node, } -impl Layout for NodePad { - fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Layouted { +impl Layout for PadNode { + fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Fragment { let areas = shrink(areas, self.padding); let mut layouted = self.child.layout(ctx, &areas); @@ -23,8 +22,8 @@ impl Layout for NodePad { } } -impl From for NodeAny { - fn from(pad: NodePad) -> Self { +impl From for AnyNode { + fn from(pad: PadNode) -> Self { Self::new(pad) } } -- cgit v1.2.3