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

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

Issue 1166363002: Position the popup menu in stocks2 correctly (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 | « no previous file | sky/sdk/lib/framework/fn2.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 3db76064bf318beefa80336e4753aff93c226967..c4e261d34c59084be28b0805e9892d245a416f28 100644
--- a/sky/examples/stocks2/lib/stock_menu.dart
+++ b/sky/examples/stocks2/lib/stock_menu.dart
@@ -8,11 +8,6 @@ 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;''');
-
PopupMenuController controller;
StockMenu({Object key, this.controller, this.autorefresh: false, this.onAutorefreshChanged}) : super(key: key);
@@ -26,14 +21,18 @@ class StockMenu extends Component {
onChanged: this.onAutorefreshChanged
);
- return new PopupMenu(
- controller: controller,
- items: [
- [new Text('Add stock')],
- [new Text('Remove stock')],
- // [new FlexExpandingChild(new Text('Autorefresh')), checkbox],
- ],
- level: 4
+ return new StackPositionedChild(
+ new PopupMenu(
+ controller: controller,
+ items: [
+ [new Text('Add stock')],
+ [new Text('Remove stock')],
+ // [new FlexExpandingChild(new Text('Autorefresh')), checkbox],
+ ],
+ level: 4
+ ),
+ right: 8.0,
+ top: 8.0 + kStatusBarHeight
);
}
}
« no previous file with comments | « no previous file | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698