From 8ade37c5aa40bd607c62915a56ad95f856256d0d Mon Sep 17 00:00:00 2001 From: Hixie Date: Mon, 8 Jun 2015 14:36:19 -0700 Subject: [PATCH] Rename Container's desiredSize argument to width and height arguments. Also change SizedBox. This makes the code that uses Container() and SizedBox() much more readable. The underlying RenderSizedBox is not affected by this change. R=abarth@chromium.org, eseidel@chromium.org Review URL: https://codereview.chromium.org/1166203002 --- examples/fn2/container.dart | 4 ++-- examples/stocks2/lib/stock_row.dart | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/fn2/container.dart b/examples/fn2/container.dart index 6cd56c1649..650775af7a 100644 --- a/examples/fn2/container.dart +++ b/examples/fn2/container.dart @@ -24,13 +24,13 @@ class ContainerApp extends App { new Container( padding: new EdgeDims.all(10.0), margin: new EdgeDims.all(10.0), - desiredSize: new sky.Size(double.INFINITY, 100.0), + height: 100.0, decoration: new BoxDecoration(backgroundColor: const sky.Color(0xFF00FF00)), child: new BlockContainer( children: [ new Container( decoration: new BoxDecoration(backgroundColor: const sky.Color(0xFFFFFF00)), - desiredSize: new sky.Size(double.INFINITY, 20.0) + height: 20.0, ), new Image(src: "https://www.dartlang.org/logos/dart-logo.png", size: new sky.Size(300.0, 300.0), diff --git a/examples/stocks2/lib/stock_row.dart b/examples/stocks2/lib/stock_row.dart index 7854b3c596..4990a55033 100644 --- a/examples/stocks2/lib/stock_row.dart +++ b/examples/stocks2/lib/stock_row.dart @@ -32,21 +32,21 @@ class StockRow extends Component { // ), new FlexExpandingChild(new Text(stock.symbol)), new Container( - desiredSize: const sky.Size.fromWidth(75.0), + width: 75.0, padding: const EdgeDims.only(right: 16.0), // text-align: right child: new Text(lastSale) ), // text-align: right, ${typography.black.caption}; new SizedBox( - desiredSize: const sky.Size.fromWidth(75.0), + width: 75.0, child: new Text(changeInPrice) ), ]; return new Container( padding: const EdgeDims(16.0, 16.0, 20.0, 16.0), - desiredSize: const sky.Size.fromHeight(kHeight), + height: kHeight, decoration: const BoxDecoration( backgroundColor: const sky.Color(0xFFFFFFFF), border: const Border(