| 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 '../fn2.dart'; | 6 import '../fn2.dart'; |
| 7 import '../theme2/colors.dart'; | 7 import '../theme2/colors.dart'; |
| 8 import '../theme2/shadows.dart'; | 8 import '../theme2/shadows.dart'; |
| 9 import 'animated_component.dart'; | 9 import 'animated_component.dart'; |
| 10 import 'dart:async'; | 10 import 'dart:async'; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // } | 107 // } |
| 108 | 108 |
| 109 UINode build() { | 109 UINode build() { |
| 110 int i = 0; | 110 int i = 0; |
| 111 List<UINode> children = new List.from(items.map((List<UINode> item) { | 111 List<UINode> children = new List.from(items.map((List<UINode> item) { |
| 112 double opacity = _opacityFor(i); | 112 double opacity = _opacityFor(i); |
| 113 return new PopupMenuItem(key: i++, children: item, opacity: opacity); | 113 return new PopupMenuItem(key: i++, children: item, opacity: opacity); |
| 114 })); | 114 })); |
| 115 | 115 |
| 116 // inlineStyle: _inlineStyle(), | 116 // inlineStyle: _inlineStyle(), |
| 117 return new ShrinkWrapWidth( | 117 return new Opacity( |
| 118 child: new Container( | 118 opacity: math.min(1.0, _position * 3.0), |
| 119 padding: const EdgeDims.all(8.0), | 119 child: new ShrinkWrapWidth( |
| 120 decoration: new BoxDecoration( | 120 child: new Container( |
| 121 backgroundColor: Grey[50], | 121 padding: const EdgeDims.all(8.0), |
| 122 borderRadius: 2.0, | 122 decoration: new BoxDecoration( |
| 123 boxShadow: Shadow[level]), | 123 backgroundColor: Grey[50], |
| 124 child: new Block(children) | 124 borderRadius: 2.0, |
| 125 boxShadow: Shadow[level]), |
| 126 child: new Block(children) |
| 127 ) |
| 125 ) | 128 ) |
| 126 ); | 129 ); |
| 127 } | 130 } |
| 128 | 131 |
| 129 } | 132 } |
| OLD | NEW |