Commit 05d6d551 authored by Adam Barth's avatar Adam Barth

Merge pull request #373 from abarth/fix_stack

RenderStack should handle top, right, bottom, left all being zero
parents fc483788 b86ad9b0
......@@ -155,14 +155,14 @@ class RenderStack extends RenderBox with ContainerRenderObjectMixin<RenderBox, S
BoxConstraints childConstraints = innerConstraints;
if (childData.left != null && childData.right != null)
childConstraints = childConstraints.applyWidth(childData.right - childData.left);
childConstraints = childConstraints.applyWidth(size.width - childData.right - childData.left);
else if (childData.left != null)
childConstraints = childConstraints.applyMaxWidth(size.width - childData.left);
else if (childData.right != null)
childConstraints = childConstraints.applyMaxWidth(size.width - childData.right);
if (childData.top != null && childData.bottom != null)
childConstraints = childConstraints.applyHeight(childData.bottom - childData.top);
childConstraints = childConstraints.applyHeight(size.height - childData.bottom - childData.top);
else if (childData.top != null)
childConstraints = childConstraints.applyMaxHeight(size.height - childData.top);
else if (childData.bottom != null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment