From ca74c312f7df8e5c492b80e4a2243fac301edb3c Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 20 Mar 2015 10:16:24 -0700 Subject: [PATCH] Use StyleNode in StockMenu StockMenu was creating a container for the sole purpose of applying style to PopupMenu. Now we just use a StyleNode. Also, I've reverted the change to make box-sizing default to border-box. It turns out that CL wasn't effective because we didn't use the initialBoxSizing function to initialize box sizing. I've made us use initialBoxSizing but switch the default back to content-box because actually using border-box breaks a bunch of stuff. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1024083003 --- examples/stocks-fn/lib/stock_menu.dart | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/examples/stocks-fn/lib/stock_menu.dart b/examples/stocks-fn/lib/stock_menu.dart index 65db00d3d9..4d54e8f601 100644 --- a/examples/stocks-fn/lib/stock_menu.dart +++ b/examples/stocks-fn/lib/stock_menu.dart @@ -17,18 +17,16 @@ class StockMenu extends Component { StockMenu({Object key, this.controller}) : super(key: key); Node build() { - return new Container( - style: _style, - children: [ - new PopupMenu( - controller: controller, - items: [ - [new Text('Add stock')], - [new Text('Remove stock')], - [new Text('Help & feeback')], - ], - level: 4) - ] + return new StyleNode( + new PopupMenu( + controller: controller, + items: [ + [new Text('Add stock')], + [new Text('Remove stock')], + [new Text('Help & feeback')], + ], + level: 4), + _style ); } }