From fcd8fa4336806d24dcf2da7b5677a75237dd2bb0 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Thu, 29 May 2025 15:01:41 -0700 Subject: [PATCH] size_cross_nth: Allocate space for widget out of remaining space --- src/widgets/size_cross_nth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/size_cross_nth.rs b/src/widgets/size_cross_nth.rs index 5e9e25d..f07f448 100644 --- a/src/widgets/size_cross_nth.rs +++ b/src/widgets/size_cross_nth.rs @@ -103,7 +103,7 @@ impl Widget for SizeCrossNth<'_, Msg> .iter() .zip(tree.children.iter_mut()) .map(|(child, tree)| { - let (max_width, max_height) = self.axis.pack(max_main, max_cross); + let (max_width, max_height) = self.axis.pack(max_main - total_main, max_cross); let child_limits = layout::Limits::new(Size::ZERO, Size::new(max_width, max_height)); let mut layout = child.as_widget().layout(tree, renderer, &child_limits);