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/background.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/layout/background.rs') diff --git a/src/layout/background.rs b/src/layout/background.rs index b331ba3c..bb155073 100644 --- a/src/layout/background.rs +++ b/src/layout/background.rs @@ -1,16 +1,16 @@ use super::*; -/// A node that places a rectangular filled background behind another node. +/// A node that places a rectangular filled background behind its child. #[derive(Debug, Clone, PartialEq)] -pub struct NodeBackground { +pub struct BackgroundNode { /// The background fill. pub fill: Fill, /// The child node to be filled. pub child: Node, } -impl Layout for NodeBackground { - fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Layouted { +impl Layout for BackgroundNode { + fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Fragment { let mut layouted = self.child.layout(ctx, areas); for frame in layouted.frames_mut() { @@ -25,8 +25,8 @@ impl Layout for NodeBackground { } } -impl From for NodeAny { - fn from(background: NodeBackground) -> Self { +impl From for AnyNode { + fn from(background: BackgroundNode) -> Self { Self::new(background) } } -- cgit v1.2.3