Implement padding support for Container
This commit is contained in:
parent
6e9ab1cd6f
commit
749a9588d7
7 changed files with 46 additions and 21 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue