Introduce useful helpers in layout module

This commit is contained in:
Héctor Ramón Jiménez 2024-01-09 06:35:33 +01:00
parent d24e50c1a6
commit d62bb8193c
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
26 changed files with 189 additions and 127 deletions

View file

@ -239,9 +239,9 @@ where
let (intrinsic_width, intrinsic_height) = axis.pack(main - pad.0, cross);
let size = limits.resolve(
Size::new(intrinsic_width, intrinsic_height),
width,
height,
Size::new(intrinsic_width, intrinsic_height),
);
Node::with_children(size.expand(padding), nodes)