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

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

Issue 1218153005: Refactoring to support dark theme better (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix import issues Created 5 years, 5 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/drawer.dart ('k') | sky/sdk/lib/widgets/floating_action_button.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 '../theme/colors.dart';
6 import '../theme/view_configuration.dart'; 5 import '../theme/view_configuration.dart';
7 import 'basic.dart'; 6 import 'basic.dart';
8 import 'default_text_style.dart'; 7 import 'default_text_style.dart';
9 import 'theme.dart'; 8 import 'theme.dart';
10 9
10 // TODO(jackson): This class should usually render the user's
11 // preferred banner image rather than a solid background
12
11 class DrawerHeader extends Component { 13 class DrawerHeader extends Component {
12 14
13 DrawerHeader({ String key, this.children }) : super(key: key); 15 DrawerHeader({ String key, this.children }) : super(key: key);
14 16
15 final List<Widget> children; 17 final List<Widget> children;
16 18
17 Widget build() { 19 Widget build() {
18 return new Container( 20 return new Container(
19 height: kStatusBarHeight + kMaterialDrawerHeight, 21 height: kStatusBarHeight + kMaterialDrawerHeight,
20 decoration: new BoxDecoration( 22 decoration: new BoxDecoration(
21 backgroundColor: BlueGrey[50], 23 backgroundColor: Theme.of(this).cardColor,
22 border: const Border( 24 border: const Border(
23 bottom: const BorderSide( 25 bottom: const BorderSide(
24 color: const Color(0xFFD1D9E1), 26 color: const Color(0xFFD1D9E1),
25 width: 1.0 27 width: 1.0
26 ) 28 )
27 ) 29 )
28 ), 30 ),
29 padding: const EdgeDims.only(bottom: 7.0), 31 padding: const EdgeDims.only(bottom: 7.0),
30 margin: const EdgeDims.only(bottom: 8.0), 32 margin: const EdgeDims.only(bottom: 8.0),
31 child: new Flex([ 33 child: new Flex([
32 new Flexible(child: new Container()), 34 new Flexible(child: new Container()),
33 new Container( 35 new Container(
34 padding: const EdgeDims.symmetric(horizontal: 16.0), 36 padding: const EdgeDims.symmetric(horizontal: 16.0),
35 child: new DefaultTextStyle( 37 child: new DefaultTextStyle(
36 style: Theme.of(this).text.body2, 38 style: Theme.of(this).text.body2,
37 child: new Flex(children, direction: FlexDirection.horizontal) 39 child: new Flex(children, direction: FlexDirection.horizontal)
38 ) 40 )
39 )], 41 )],
40 direction: FlexDirection.vertical 42 direction: FlexDirection.vertical
41 ) 43 )
42 ); 44 );
43 } 45 }
44 46
45 } 47 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/drawer.dart ('k') | sky/sdk/lib/widgets/floating_action_button.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698