Set proper size boundaries for limits in Stack::layout

This commit is contained in:
Héctor Ramón Jiménez 2024-04-27 06:20:41 +02:00
parent bb9244107c
commit c58155a971
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -151,6 +151,8 @@ where
renderer: &Renderer,
limits: &layout::Limits,
) -> layout::Node {
let limits = limits.width(self.width).height(self.height);
if self.children.is_empty() {
return layout::Node::new(limits.resolve(
self.width,
@ -159,7 +161,6 @@ where
));
}
let limits = limits.width(self.width).height(self.height);
let base = self.children[0].as_widget().layout(
&mut tree.children[0],
renderer,