diff options
author | 2024-04-27 06:08:30 +0200 | |
---|---|---|
committer | 2024-04-27 06:08:30 +0200 | |
commit | bb9244107c8fee78f9b77f5ab0e4c2c31456d6c4 (patch) | |
tree | c8f8805b1c652df3416fe0f1f7a4481082b597a3 | |
parent | ce12231e22372eea0369f99b8fdfe26aa1240c57 (diff) | |
download | iced-bb9244107c8fee78f9b77f5ab0e4c2c31456d6c4.tar.gz iced-bb9244107c8fee78f9b77f5ab0e4c2c31456d6c4.tar.bz2 iced-bb9244107c8fee78f9b77f5ab0e4c2c31456d6c4.zip |
Respect `width` and `height` properties when `Stack` is empty
-rw-r--r-- | widget/src/stack.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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); |