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

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

Issue 1171173003: Right-size the toolbar (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Toolbar contents bottom-justfied, stretch past notification area 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
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 '../rendering/flex.dart';
7 import '../theme2/view_configuration.dart';
7 import '../theme2/shadows.dart'; 8 import '../theme2/shadows.dart';
8 9
9 class ToolBar extends Component { 10 class ToolBar extends Component {
10 11
11 ToolBar({ 12 ToolBar({
12 String key, 13 String key,
13 this.left, 14 this.left,
14 this.center, 15 this.center,
15 this.right, 16 this.right,
16 this.backgroundColor 17 this.backgroundColor
(...skipping 10 matching lines...) Expand all
27 new FlexExpandingChild( 28 new FlexExpandingChild(
28 new Padding( 29 new Padding(
29 child: center, 30 child: center,
30 padding: new EdgeDims.only(left: 24.0) 31 padding: new EdgeDims.only(left: 24.0)
31 )) 32 ))
32 ]; 33 ];
33 34
34 if (right != null) 35 if (right != null)
35 children.addAll(right); 36 children.addAll(right);
36 37
38 var bottomJustifiedChild = new FlexContainer(
abarth-chromium 2015/06/10 17:50:40 Can you add a TODO comment about this being a work
hansmuller 2015/06/10 17:56:10 Done.
Hixie 2015/06/10 17:57:13 UINode, not var.
39 direction: FlexDirection.vertical,
40 justifyContent: FlexJustifyContent.flexEnd,
41 children: [new Container(
42 child: new FlexContainer(children: children),
43 height: kToolBarHeight)]);
44
37 return new Container( 45 return new Container(
38 child: new FlexContainer( 46 child: bottomJustifiedChild,
39 children: children, 47 padding: new EdgeDims(0.0, 8.0, 0.0, 8.0),
Hixie 2015/06/10 17:57:13 Use the EdgeDims constructor for symmetric sides.
hansmuller 2015/06/10 18:06:24 Done. That's much clearer.
40 direction: FlexDirection.horizontal
41 ),
42 height: 56.0,
43 padding: new EdgeDims(kStatusBarHeight.toDouble(), 8.0, 0.0, 8.0),
44 decoration: new BoxDecoration( 48 decoration: new BoxDecoration(
45 backgroundColor: backgroundColor, 49 backgroundColor: backgroundColor,
46 boxShadow: Shadow[2] 50 boxShadow: Shadow[2]
47 ) 51 )
48 ); 52 );
49 } 53 }
50 54
51 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698