Implement padding support for Container

This commit is contained in:
Héctor Ramón Jiménez 2020-03-31 01:19:28 +02:00
parent 6e9ab1cd6f
commit 749a9588d7
7 changed files with 46 additions and 21 deletions

View file

@ -171,8 +171,5 @@ where
let (width, height) = axis.pack(main - padding, cross);
let size = limits.resolve(Size::new(width, height));
Node::with_children(
Size::new(size.width + padding * 2.0, size.height + padding * 2.0),
nodes,
)
Node::with_children(size.pad(padding), nodes)
}