From 3da55e807440a99f6ed62edc2e7a84ca4be9b844 Mon Sep 17 00:00:00 2001 From: Hojjat Date: Tue, 17 Mar 2026 16:45:39 -0600 Subject: [PATCH] fix(flex_row): calculate height based on nodes --- src/widget/flex_row/layout.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widget/flex_row/layout.rs b/src/widget/flex_row/layout.rs index ae0c28d..166b47f 100644 --- a/src/widget/flex_row/layout.rs +++ b/src/widget/flex_row/layout.rs @@ -162,9 +162,14 @@ pub fn resolve( }); }); + let actual_height = nodes + .iter() + .map(|node| node.bounds().y + node.bounds().height) + .fold(0.0f32, f32::max); + let size = Size { 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)