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

Side by Side Diff: sky/sdk/lib/widgets/tool_bar.dart

Issue 1194743003: Add a new Theme widget to control color and text color of apps (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase 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/widgets/theme.dart ('k') | sky/sdk/lib/widgets/widget.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 'package:sky/widgets/theme.dart';
6
5 import '../rendering/flex.dart'; 7 import '../rendering/flex.dart';
6 import '../theme/shadows.dart'; 8 import '../theme/shadows.dart';
7 import '../theme/view_configuration.dart'; 9 import '../theme/view_configuration.dart';
8 import 'basic.dart'; 10 import 'basic.dart';
9 11
10 class ToolBar extends Component { 12 class ToolBar extends Component {
11 13
12 ToolBar({ 14 ToolBar({
13 String key, 15 String key,
14 this.left, 16 this.left,
(...skipping 26 matching lines...) Expand all
41 if (right != null) 43 if (right != null)
42 children.addAll(right); 44 children.addAll(right);
43 45
44 return new Container( 46 return new Container(
45 child: new Flex( 47 child: new Flex(
46 [new Container(child: new Flex(children), height: kToolBarHeight)], 48 [new Container(child: new Flex(children), height: kToolBarHeight)],
47 alignItems: FlexAlignItems.flexEnd 49 alignItems: FlexAlignItems.flexEnd
48 ), 50 ),
49 padding: new EdgeDims.symmetric(horizontal: 8.0), 51 padding: new EdgeDims.symmetric(horizontal: 8.0),
50 decoration: new BoxDecoration( 52 decoration: new BoxDecoration(
51 backgroundColor: backgroundColor, 53 backgroundColor: backgroundColor == null ? Theme.of(this).color[500] : b ackgroundColor,
52 boxShadow: shadows[2] 54 boxShadow: shadows[2]
53 ) 55 )
54 ); 56 );
55 } 57 }
56 58
57 } 59 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/theme.dart ('k') | sky/sdk/lib/widgets/widget.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698