| 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 '../fn2.dart'; | 7 import '../fn2.dart'; |
| 8 import '../theme2/colors.dart'; | 8 import '../theme2/colors.dart'; |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'dart:math' as math; | 10 import 'dart:math' as math; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // }); | 91 // }); |
| 92 // } | 92 // } |
| 93 | 93 |
| 94 UINode build() { | 94 UINode build() { |
| 95 int i = 0; | 95 int i = 0; |
| 96 List<UINode> children = new List.from(items.map((List<UINode> item) { | 96 List<UINode> children = new List.from(items.map((List<UINode> item) { |
| 97 double opacity = _opacityFor(i); | 97 double opacity = _opacityFor(i); |
| 98 return new PopupMenuItem(key: i++, children: item, opacity: opacity); | 98 return new PopupMenuItem(key: i++, children: item, opacity: opacity); |
| 99 })); | 99 })); |
| 100 | 100 |
| 101 return new Material( | 101 return new ShrinkWrapWidth( |
| 102 content: new Container( | 102 child: new Material( |
| 103 padding: const EdgeDims.all(8.0), | 103 content: new Container( |
| 104 // border-radius: 2px | 104 padding: const EdgeDims.all(8.0), |
| 105 decoration: new BoxDecoration(backgroundColor: Grey[50]), | 105 // border-radius: 2px |
| 106 // inlineStyle: _inlineStyle(), | 106 decoration: new BoxDecoration(backgroundColor: Grey[50]), |
| 107 child: new BlockContainer(children: children) | 107 // inlineStyle: _inlineStyle(), |
| 108 ), | 108 child: new BlockContainer(children: children) |
| 109 level: level); | 109 ), |
| 110 level: level |
| 111 ) |
| 112 ); |
| 110 } | 113 } |
| 111 } | 114 } |
| OLD | NEW |