From bb9244107c8fee78f9b77f5ab0e4c2c31456d6c4 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 27 Apr 2024 06:08:30 +0200 Subject: Respect `width` and `height` properties when `Stack` is empty --- widget/src/stack.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'widget/src/stack.rs') diff --git a/widget/src/stack.rs b/widget/src/stack.rs index 8a0ea2eb..2774d035 100644 --- a/widget/src/stack.rs +++ b/widget/src/stack.rs @@ -152,7 +152,11 @@ where limits: &layout::Limits, ) -> layout::Node { if self.children.is_empty() { - return layout::Node::new(Size::ZERO); + return layout::Node::new(limits.resolve( + self.width, + self.height, + Size::ZERO, + )); } let limits = limits.width(self.width).height(self.height); -- cgit