fix(flex_row): calculate height based on nodes

This commit is contained in:
Hojjat 2026-03-17 16:45:39 -06:00 committed by Michael Murphy
parent 54bcb9ec12
commit 3da55e8074

View file

@ -162,9 +162,14 @@ pub fn resolve<Message>(
}); });
}); });
let actual_height = nodes
.iter()
.map(|node| node.bounds().y + node.bounds().height)
.fold(0.0f32, f32::max);
let size = Size { let size = Size {
width: flex_layout.content_size.width, width: flex_layout.content_size.width,
height: flex_layout.content_size.height, height: actual_height.max(flex_layout.content_size.height),
}; };
Node::with_children(size, nodes) Node::with_children(size, nodes)