Respect width and height properties when Stack is empty
This commit is contained in:
parent
ce12231e22
commit
bb9244107c
1 changed files with 5 additions and 1 deletions
|
|
@ -152,7 +152,11 @@ where
|
||||||
limits: &layout::Limits,
|
limits: &layout::Limits,
|
||||||
) -> layout::Node {
|
) -> layout::Node {
|
||||||
if self.children.is_empty() {
|
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);
|
let limits = limits.width(self.width).height(self.height);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue