From 937b5a2c85b88e9aa64368689e42a1f15a922ef3 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 20 Aug 2015 11:13:42 -0700 Subject: [PATCH] Stack squishes positioned elements near the edge When laying out positioned children inside a stack, we should give them unbounded constraints because if they draw outside of the stack, we'll just clip them. --- examples/widgets/card_collection.dart | 2 ++ sky/packages/sky/lib/rendering/stack.dart | 12 +----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/examples/widgets/card_collection.dart b/examples/widgets/card_collection.dart index 441be1dcd6b88..5dce65c21287a 100644 --- a/examples/widgets/card_collection.dart +++ b/examples/widgets/card_collection.dart @@ -76,6 +76,8 @@ class CardCollectionApp extends App { // background (text and icons) will just be clipped, not resized. Widget background = new Positioned( top: 0.0, + right: 0.0, + bottom: 0.0, left: 0.0, child: new Container( margin: const EdgeDims.all(4.0), diff --git a/sky/packages/sky/lib/rendering/stack.dart b/sky/packages/sky/lib/rendering/stack.dart index 4a01dae172d87..0d850a6c22bd8 100644 --- a/sky/packages/sky/lib/rendering/stack.dart +++ b/sky/packages/sky/lib/rendering/stack.dart @@ -146,29 +146,19 @@ class RenderStack extends RenderBox with ContainerRenderObjectMixin