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

Side by Side Diff: sky/examples/stocks-fn/lib/stock_menu.dart

Issue 1017193004: Improve the openning animation for PopupMenu (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_app.dart ('k') | sky/framework/components/popup_menu.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'package:sky/framework/components/popup_menu.dart'; 5 import 'package:sky/framework/components/popup_menu.dart';
6 import 'package:sky/framework/fn.dart'; 6 import 'package:sky/framework/fn.dart';
7 import 'package:sky/framework/theme/view-configuration.dart'; 7 import 'package:sky/framework/theme/view-configuration.dart';
8 import 'stock_arrow.dart';
9 import 'stock_data.dart';
10 8
11 class StockMenu extends Component { 9 class StockMenu extends Component {
12 static final Style _style = new Style(''' 10 static final Style _style = new Style('''
13 position: absolute; 11 position: absolute;
14 right: 8px; 12 right: 8px;
15 top: ${8 + kStatusBarHeight}px;'''); 13 top: ${8 + kStatusBarHeight}px;''');
16 14
17 StockMenu({Object key}) : super(key: key); 15 PopupMenuController controller;
16
17 StockMenu({Object key, this.controller}) : super(key: key);
18 18
19 Node build() { 19 Node build() {
20 return new Container( 20 return new Container(
21 style: _style, 21 style: _style,
22 children: [ 22 children: [
23 new PopupMenu( 23 new PopupMenu(
24 controller: controller,
24 items: [ 25 items: [
25 [new Text('Add stock')], 26 [new Text('Add stock')],
26 [new Text('Remove stock')], 27 [new Text('Remove stock')],
27 [new Text('Help & feeback')], 28 [new Text('Help & feeback')],
28 ], 29 ],
29 level: 4) 30 level: 4)
30 ] 31 ]
31 ); 32 );
32 } 33 }
33 } 34 }
OLDNEW
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_app.dart ('k') | sky/framework/components/popup_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698