From 51c670e62b5e2e7b4b7e7be080d93e53d5336ed9 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 21 May 2015 13:32:21 -0700 Subject: [PATCH] Address Ian's comments on layout2.dart R=ianh@google.com Review URL: https://codereview.chromium.org/1152603002 --- examples/raw/simple_render_tree.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/raw/simple_render_tree.dart b/examples/raw/simple_render_tree.dart index 205043523b..a9e559b0ac 100644 --- a/examples/raw/simple_render_tree.dart +++ b/examples/raw/simple_render_tree.dart @@ -18,8 +18,8 @@ class RenderSolidColor extends RenderDecoratedBox { } void layout(BoxConstraints constraints, { RenderNode relayoutSubtreeRoot }) { - setWidth(constraints, constraints.maxWidth); - setHeight(constraints, 200.0); + width = constraints.constrainWidth(constraints.maxWidth); + height = constraints.constrainHeight(200.0); layoutDone(); } @@ -57,7 +57,8 @@ void main() { view.setBeginFrameCallback(beginFrame); var root = new RenderBlock( - decoration: new BoxDecoration(backgroundColor: 0xFF00FFFF)); + decoration: new BoxDecoration(backgroundColor: 0xFF00FFFF), + padding: const EdgeDims(10.0, 10.0, 10.0, 10.0)); root.add(new RenderSolidColor(0xFF00FF00)); root.add(new RenderSolidColor(0xFF0000FF));