diff options
Diffstat (limited to 'src/library/shape.rs')
| -rw-r--r-- | src/library/shape.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/library/shape.rs b/src/library/shape.rs index 61c0d6e3..c83a1c49 100644 --- a/src/library/shape.rs +++ b/src/library/shape.rs @@ -76,20 +76,18 @@ fn shape_impl( } // The shape's contents. - let body = args.find::<Template>(); + let body = args.find::<Node>(); - Ok(Value::Template(Template::from_inline(move |style| { + Ok(Value::inline( ShapeNode { kind, fill, stroke, - child: body - .as_ref() - .map(|body| body.pack(style).padded(Sides::splat(padding))), + child: body.map(|body| body.into_block().padded(Sides::splat(padding))), } .pack() - .sized(Spec::new(width, height)) - }))) + .sized(Spec::new(width, height)), + )) } /// Places its child into a sizable and fillable shape. |
