diff options
Diffstat (limited to 'src/library/layout/pad.rs')
| -rw-r--r-- | src/library/layout/pad.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/library/layout/pad.rs b/src/library/layout/pad.rs index effdd5f8..920660d6 100644 --- a/src/library/layout/pad.rs +++ b/src/library/layout/pad.rs @@ -1,15 +1,15 @@ use crate::library::prelude::*; -/// Pad a node at the sides. +/// Pad content at the sides. #[derive(Debug, Hash)] pub struct PadNode { /// The amount of padding. pub padding: Sides<Rel<Length>>, - /// The child node whose sides to pad. + /// The content whose sides to pad. pub child: Content, } -#[node(Layout)] +#[node(LayoutBlock)] impl PadNode { fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { let all = args.named("rest")?.or(args.find()?); @@ -25,8 +25,8 @@ impl PadNode { } } -impl Layout for PadNode { - fn layout( +impl LayoutBlock for PadNode { + fn layout_block( &self, world: Tracked<dyn World>, regions: &Regions, @@ -51,10 +51,6 @@ impl Layout for PadNode { Ok(frames) } - - fn level(&self) -> Level { - Level::Block - } } /// Shrink a size by padding relative to the size itself. |
