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

Side by Side Diff: sky/framework/components/popup_menu.dart

Issue 1024083003: Use StyleNode in StockMenu (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_menu.dart ('k') | no next file » | 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 'animated_component.dart'; 5 import 'animated_component.dart';
6 import '../animation/animated_value.dart'; 6 import '../animation/animated_value.dart';
7 import '../fn.dart'; 7 import '../fn.dart';
8 import '../theme/colors.dart'; 8 import '../theme/colors.dart';
9 import '../theme/view-configuration.dart'; 9 import '../theme/view-configuration.dart';
10 import 'dart:math' as math; 10 import 'dart:math' as math;
(...skipping 19 matching lines...) Expand all
30 // TODO(abarth): We shouldn't mark the menu as closed until the animation 30 // TODO(abarth): We shouldn't mark the menu as closed until the animation
31 // completes. 31 // completes.
32 isOpen = false; 32 isOpen = false;
33 } 33 }
34 } 34 }
35 35
36 class PopupMenu extends AnimatedComponent { 36 class PopupMenu extends AnimatedComponent {
37 static final Style _style = new Style(''' 37 static final Style _style = new Style('''
38 border-radius: 2px; 38 border-radius: 2px;
39 padding: 8px 0; 39 padding: 8px 0;
40 background-color: ${Grey[50]};''' 40 box-sizing: border-box;
41 ); 41 background-color: ${Grey[50]};''');
42 42
43 List<List<Node>> items; 43 List<List<Node>> items;
44 int level; 44 int level;
45 PopupMenuController controller; 45 PopupMenuController controller;
46 46
47 double _position; 47 double _position;
48 List<AnimatedValue> _opacities; 48 List<AnimatedValue> _opacities;
49 int _width; 49 int _width;
50 int _height; 50 int _height;
51 51
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 return new Material( 101 return new Material(
102 style: _style, 102 style: _style,
103 inlineStyle: _inlineStyle(), 103 inlineStyle: _inlineStyle(),
104 children: children, 104 children: children,
105 level: level 105 level: level
106 ); 106 );
107 } 107 }
108 } 108 }
OLDNEW
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_menu.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698