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

Unified Diff: sky/examples/stocks2/lib/stock_menu.dart

Issue 1166153002: Add a basic popup menu implementation to stocks2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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/stocks2/lib/stock_app.dart ('k') | sky/sdk/lib/framework/components2/checkbox.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks2/lib/stock_menu.dart
diff --git a/sky/examples/stocks2/lib/stock_menu.dart b/sky/examples/stocks2/lib/stock_menu.dart
index aadc3a3d8c69b43c358eb52b0f7281afd7f5abb2..3db76064bf318beefa80336e4753aff93c226967 100644
--- a/sky/examples/stocks2/lib/stock_menu.dart
+++ b/sky/examples/stocks2/lib/stock_menu.dart
@@ -8,10 +8,10 @@ import 'package:sky/framework/components2/checkbox.dart';
import 'package:sky/framework/theme/view_configuration.dart';
class StockMenu extends Component {
- static final Style _style = new Style('''
- position: absolute;
- right: 8px;
- top: ${8 + kStatusBarHeight}px;''');
+ // static final Style _style = new Style('''
+ // position: absolute;
+ // right: 8px;
+ // top: ${8 + kStatusBarHeight}px;''');
PopupMenuController controller;
@@ -20,24 +20,20 @@ class StockMenu extends Component {
final bool autorefresh;
final ValueChanged onAutorefreshChanged;
- static FlexBoxParentData _flex1 = new FlexBoxParentData()..flex = 1;
-
UINode build() {
var checkbox = new Checkbox(
checked: this.autorefresh,
onChanged: this.onAutorefreshChanged
);
- return new StyleNode(
- new PopupMenu(
- controller: controller,
- items: [
- [new Text('Add stock')],
- [new Text('Remove stock')],
- [new ParentDataNode(new Text('Autorefresh'), _flex1), checkbox],
- ],
- level: 4),
- _style
+ return new PopupMenu(
+ controller: controller,
+ items: [
+ [new Text('Add stock')],
+ [new Text('Remove stock')],
+ // [new FlexExpandingChild(new Text('Autorefresh')), checkbox],
+ ],
+ level: 4
);
}
}
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/sdk/lib/framework/components2/checkbox.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698