From 9492da11d90893b396e8dfdae47cc54c6ab42411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 25 Apr 2024 02:25:36 +0200 Subject: [PATCH] Use `Limits::resolve` in `Stack` widget --- widget/src/stack.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/widget/src/stack.rs b/widget/src/stack.rs index d6a1538eec..6e5dacd238 100644 --- a/widget/src/stack.rs +++ b/widget/src/stack.rs @@ -155,13 +155,14 @@ where return layout::Node::new(Size::ZERO); } + let limits = limits.width(self.width).height(self.height); let base = self.children[0].as_widget().layout( &mut tree.children[0], renderer, - limits, + &limits, ); - let size = base.size(); + let size = limits.resolve(self.width, self.height, base.size()); let limits = layout::Limits::new(Size::ZERO, size); let nodes = std::iter::once(base)