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

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

Issue 1174023003: Remove one more use of mirrors: Components now have to explicitly sync their fields. (Closed) Base URL: https://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/sdk/lib/framework/components2/scrollable.dart ('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 '../fn2.dart'; 5 import '../fn2.dart';
6 import '../theme/view_configuration.dart'; 6 import '../theme/view_configuration.dart';
7 import '../theme2/shadows.dart'; 7 import '../theme2/shadows.dart';
8 8
9 class ToolBar extends Component { 9 class ToolBar extends Component {
10 10
11 ToolBar({ 11 ToolBar({
12 String key, 12 String key,
13 this.left, 13 this.left,
14 this.center, 14 this.center,
15 this.right, 15 this.right,
16 this.backgroundColor 16 this.backgroundColor
17 }) : super(key: key); 17 }) : super(key: key);
18 18
19 UINode left; 19 final UINode left;
20 UINode center; 20 final UINode center;
21 List<UINode> right; 21 final List<UINode> right;
22 Color backgroundColor; 22 final Color backgroundColor;
23 23
24 UINode build() { 24 UINode build() {
25 List<UINode> children = [ 25 List<UINode> children = [
26 left, 26 left,
27 new FlexExpandingChild( 27 new FlexExpandingChild(
28 new Padding( 28 new Padding(
29 child: center, 29 child: center,
30 padding: new EdgeDims.only(left: 24.0) 30 padding: new EdgeDims.only(left: 24.0)
31 )) 31 ))
32 ]; 32 ];
33 33
34 if (right != null) 34 if (right != null)
35 children.addAll(right); 35 children.addAll(right);
36 36
37 return new Container( 37 return new Container(
38 child: new FlexContainer( 38 child: new FlexContainer(
39 children: children, 39 children: children,
40 direction: FlexDirection.horizontal 40 direction: FlexDirection.horizontal
41 ), 41 ),
42 height: 56.0, 42 height: 56.0,
43 padding: new EdgeDims(kStatusBarHeight.toDouble(), 8.0, 0.0, 8.0), 43 padding: new EdgeDims(kStatusBarHeight.toDouble(), 8.0, 0.0, 8.0),
44 decoration: new BoxDecoration( 44 decoration: new BoxDecoration(
45 backgroundColor: backgroundColor, 45 backgroundColor: backgroundColor,
46 boxShadow: Shadow[2] 46 boxShadow: Shadow[2]
47 ) 47 )
48 ); 48 );
49 } 49 }
50 50
51 } 51 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/components2/scrollable.dart ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698