diff options
Diffstat (limited to 'src/layout/background.rs')
| -rw-r--r-- | src/layout/background.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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<NodeBackground> for NodeAny { - fn from(background: NodeBackground) -> Self { +impl From<BackgroundNode> for AnyNode { + fn from(background: BackgroundNode) -> Self { Self::new(background) } } |
