| 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 '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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |