| OLD | NEW |
| 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 '../animation/animated_value.dart'; | 5 import '../animation/animated_value.dart'; |
| 6 import '../fn.dart'; | 6 import '../fn.dart'; |
| 7 import '../theme/colors.dart'; | 7 import '../theme/colors.dart'; |
| 8 import '../theme/view-configuration.dart'; | 8 import '../theme/view-configuration.dart'; |
| 9 import 'dart:math' as math; | 9 import 'dart:math' as math; |
| 10 import 'dart:sky' as sky; | 10 import 'dart:sky' as sky; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // TODO(abarth): We shouldn't mark the menu as closed until the animation | 29 // TODO(abarth): We shouldn't mark the menu as closed until the animation |
| 30 // completes. | 30 // completes. |
| 31 isOpen = false; | 31 isOpen = false; |
| 32 } | 32 } |
| 33 } | 33 } |
| 34 | 34 |
| 35 class PopupMenu extends Component { | 35 class PopupMenu extends Component { |
| 36 static final Style _style = new Style(''' | 36 static final Style _style = new Style(''' |
| 37 border-radius: 2px; | 37 border-radius: 2px; |
| 38 padding: 8px 0; | 38 padding: 8px 0; |
| 39 box-sizing: border-box; | |
| 40 background-color: ${Grey[50]};''' | 39 background-color: ${Grey[50]};''' |
| 41 ); | 40 ); |
| 42 | 41 |
| 43 List<List<Node>> items; | 42 List<List<Node>> items; |
| 44 int level; | 43 int level; |
| 45 PopupMenuController controller; | 44 PopupMenuController controller; |
| 46 | 45 |
| 47 AnimatedValueListener _position; | 46 AnimatedValueListener _position; |
| 48 List<AnimatedValue> _opacities; | 47 List<AnimatedValue> _opacities; |
| 49 int _width; | 48 int _width; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 102 } |
| 104 | 103 |
| 105 return new Material( | 104 return new Material( |
| 106 style: _style, | 105 style: _style, |
| 107 inlineStyle: _inlineStyle(), | 106 inlineStyle: _inlineStyle(), |
| 108 children: children, | 107 children: children, |
| 109 level: level | 108 level: level |
| 110 ); | 109 ); |
| 111 } | 110 } |
| 112 } | 111 } |
| OLD | NEW |