diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-03-19 17:57:31 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-03-19 17:57:31 +0100 |
| commit | 264a7dedd42e27cd9e604037640cf0594b2ec46b (patch) | |
| tree | d26feea399d54bb86bd44878f40293983bf5251d /src/layout/background.rs | |
| parent | ca3df70e2a5069832d7d2135967674c34a155442 (diff) | |
Scheduled maintenance 🔨
- 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
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) } } |
