Set proper size boundaries for limits in Stack::layout
This commit is contained in:
parent
bb9244107c
commit
c58155a971
1 changed files with 2 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue