Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: sky/sdk/lib/framework/components2/popup_menu.dart

Issue 1174253003: Make the stocks popup menu fade in (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/platform/graphics/GraphicsContext.h.rej ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « sky/engine/platform/graphics/GraphicsContext.h.rej ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698