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
This commit is contained in:
Adam Barth 2015-03-20 10:16:24 -07:00
parent f65ff7f4e5
commit ca74c312f7

View File

@ -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
);
}
}