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

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

Issue 1161323004: Export Point, Size, Rect, Color, Paint, Path, BoxDecoration, Border, BorderSide, EdgeDims, and Flex… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: without analyser changes 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/scaffold.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 'dart:sky' as sky;
6 import '../fn2.dart'; 5 import '../fn2.dart';
7 import '../theme/view_configuration.dart'; 6 import '../theme/view_configuration.dart';
8 import '../rendering/box.dart';
9 import '../rendering/flex.dart';
10 // import 'material.dart'; 7 // import 'material.dart';
11 8
12 class ToolBar extends Component { 9 class ToolBar extends Component {
13 UINode left; 10 UINode left;
14 UINode center; 11 UINode center;
15 List<UINode> right; 12 List<UINode> right;
16 sky.Color backgroundColor; 13 Color backgroundColor;
17 14
18 ToolBar({ 15 ToolBar({
19 String key, 16 String key,
20 this.left, 17 this.left,
21 this.center, 18 this.center,
22 this.right, 19 this.right,
23 this.backgroundColor 20 this.backgroundColor
24 }) : super(key: key); 21 }) : super(key: key);
25 22
26 UINode build() { 23 UINode build() {
27 List<UINode> children = [ 24 List<UINode> children = [
28 left, 25 left,
29 new FlexExpandingChild( 26 new FlexExpandingChild(
30 new Padding( 27 new Padding(
31 child: center, 28 child: center,
32 padding: new EdgeDims.only(left: 24.0) 29 padding: new EdgeDims.only(left: 24.0)
33 )) 30 ))
34 ]; 31 ];
35 32
36 if (right != null) 33 if (right != null)
37 children.addAll(right); 34 children.addAll(right);
38 35
39 return new Container( 36 return new Container(
40 child: new FlexContainer( 37 child: new FlexContainer(
41 children: children, 38 children: children,
42 direction: FlexDirection.horizontal 39 direction: FlexDirection.horizontal
43 ), 40 ),
44 desiredSize: new sky.Size.fromHeight(56.0), 41 desiredSize: new Size.fromHeight(56.0),
45 padding: new EdgeDims(kStatusBarHeight.toDouble(), 8.0, 0.0, 8.0), 42 padding: new EdgeDims(kStatusBarHeight.toDouble(), 8.0, 0.0, 8.0),
46 decoration: new BoxDecoration(backgroundColor: backgroundColor) 43 decoration: new BoxDecoration(backgroundColor: backgroundColor)
47 ); 44 );
48 } 45 }
49 } 46 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/components2/scaffold.dart ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698