| 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 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:math' as math; | 6 import 'dart:math' as math; |
| 7 import 'dart:sky' as sky; | 7 import 'dart:sky' as sky; |
| 8 | 8 |
| 9 import 'package:sky/animation/animation_performance.dart'; | 9 import 'package:sky/animation/animation_performance.dart'; |
| 10 import 'package:sky/painting/box_painter.dart'; | 10 import 'package:sky/painting/box_painter.dart'; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 backgroundColor: Grey[50], | 102 backgroundColor: Grey[50], |
| 103 borderRadius: 2.0, | 103 borderRadius: 2.0, |
| 104 boxShadow: shadows[level])); | 104 boxShadow: shadows[level])); |
| 105 watch(controller.performance); | 105 watch(controller.performance); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void syncFields(PopupMenu source) { | 108 void syncFields(PopupMenu source) { |
| 109 controller = source.controller; | 109 controller = source.controller; |
| 110 items = source.items; | 110 items = source.items; |
| 111 level = source.level; | 111 level = source.level; |
| 112 _painter = source._painter; | |
| 113 super.syncFields(source); | 112 super.syncFields(source); |
| 114 } | 113 } |
| 115 | 114 |
| 116 BoxPainter _painter; | 115 BoxPainter _painter; |
| 117 | 116 |
| 118 double _opacityFor(int i) { | 117 double _opacityFor(int i) { |
| 119 assert(controller.position.value != null); | 118 assert(controller.position.value != null); |
| 120 if (controller.position.value == null || controller.position.value == 1.0) | 119 if (controller.position.value == null || controller.position.value == 1.0) |
| 121 return 1.0; | 120 return 1.0; |
| 122 double unit = 1.0 / items.length; | 121 double unit = 1.0 / items.length; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 ) | 158 ) |
| 160 ) | 159 ) |
| 161 ) | 160 ) |
| 162 ) | 161 ) |
| 163 ) | 162 ) |
| 164 ) | 163 ) |
| 165 ); | 164 ); |
| 166 } | 165 } |
| 167 | 166 |
| 168 } | 167 } |
| OLD | NEW |