Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: sky/framework/components/menu_item.dart

Issue 1132983007: [Layout] Put in some guards to prevent us from reintroducing 'display' properties into the CSS. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: git cl status Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/stocks/lib/stock_row.dart ('k') | sky/framework/layout.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/components/menu_item.dart
diff --git a/sky/framework/components/menu_item.dart b/sky/framework/components/menu_item.dart
index 8d7cda7c7f9bb22632342088e2a6cc301f1e7f3a..eb46a07900be514fbb37acbb609fa709f92e72d9 100644
--- a/sky/framework/components/menu_item.dart
+++ b/sky/framework/components/menu_item.dart
@@ -27,10 +27,11 @@ class MenuItem extends ButtonBase {
);
static final Style _labelStyle = new Style('''
- padding: 0px 16px;
- flex: 1;'''
+ padding: 0px 16px;'''
);
+ static final FlexBoxParentData _labelFlex = new FlexBoxParentData()..flex = 1;
+
List<UINode> children;
String icon;
GestureEventListener onGestureTap;
@@ -49,10 +50,13 @@ class MenuItem extends ButtonBase {
),
_iconStyle
),
- new FlexContainer(
- direction: FlexDirection.Row,
- style: _labelStyle,
- children: children
+ new ParentDataNode(
+ new FlexContainer(
+ direction: FlexDirection.Row,
+ style: _labelStyle,
+ children: children
+ ),
+ _labelFlex
)
]
),
« no previous file with comments | « sky/examples/stocks/lib/stock_row.dart ('k') | sky/framework/layout.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698