| 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 '../fn2.dart'; | 5 import '../fn2.dart'; |
| 6 import '../rendering/flex.dart'; | 6 import '../rendering/flex.dart'; |
| 7 import '../theme2/view_configuration.dart'; | 7 import '../theme2/view_configuration.dart'; |
| 8 import '../theme2/shadows.dart'; | 8 import '../theme2/shadows.dart'; |
| 9 | 9 |
| 10 class ToolBar extends Component { | 10 class ToolBar extends Component { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 new FlexExpandingChild( | 28 new FlexExpandingChild( |
| 29 new Padding( | 29 new Padding( |
| 30 child: center, | 30 child: center, |
| 31 padding: new EdgeDims.only(left: 24.0) | 31 padding: new EdgeDims.only(left: 24.0) |
| 32 )) | 32 )) |
| 33 ]; | 33 ]; |
| 34 | 34 |
| 35 if (right != null) | 35 if (right != null) |
| 36 children.addAll(right); | 36 children.addAll(right); |
| 37 | 37 |
| 38 // TODO(hansmuller): use align-items:flex-end when Flex supports it. | |
| 39 UINode bottomJustifiedChild = new Flex([ | |
| 40 new Container(child: new Flex(children), height: kToolBarHeight) | |
| 41 ], | |
| 42 direction: FlexDirection.vertical, | |
| 43 justifyContent: FlexJustifyContent.flexEnd); | |
| 44 | |
| 45 return new Container( | 38 return new Container( |
| 46 child: bottomJustifiedChild, | 39 child: new Flex( |
| 40 [new Container(child: new Flex(children), height: kToolBarHeight)], |
| 41 alignItems: FlexAlignItems.flexEnd |
| 42 ), |
| 47 padding: new EdgeDims.symmetric(horizontal: 8.0), | 43 padding: new EdgeDims.symmetric(horizontal: 8.0), |
| 48 decoration: new BoxDecoration( | 44 decoration: new BoxDecoration( |
| 49 backgroundColor: backgroundColor, | 45 backgroundColor: backgroundColor, |
| 50 boxShadow: Shadow[2] | 46 boxShadow: Shadow[2] |
| 51 ) | 47 ) |
| 52 ); | 48 ); |
| 53 } | 49 } |
| 54 | 50 |
| 55 } | 51 } |
| OLD | NEW |