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

Side by Side Diff: sky/framework/components/drawer_header.dart

Issue 1139123005: [Effen] Remove 'display' from drawer_header.dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: base is now checked in Created 5 years, 7 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 | « no previous file | no next file » | 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 '../fn.dart'; 5 import '../fn.dart';
6 import '../layout.dart';
6 import '../theme/colors.dart'; 7 import '../theme/colors.dart';
7 import '../theme/view_configuration.dart'; 8 import '../theme/view_configuration.dart';
8 9
9 class DrawerHeader extends Component { 10 class DrawerHeader extends Component {
10 static final Style _style = new Style(''' 11 static final Style _style = new Style('''
11 display: flex;
12 flex-direction: column;
13 height: ${140 + kStatusBarHeight}px; 12 height: ${140 + kStatusBarHeight}px;
14 -webkit-user-select: none;
15 background-color: ${BlueGrey[50]}; 13 background-color: ${BlueGrey[50]};
16 border-bottom: 1px solid #D1D9E1; 14 border-bottom: 1px solid #D1D9E1;
17 padding-bottom: 7px; 15 padding-bottom: 7px;
18 margin-bottom: 8px;''' 16 margin-bottom: 8px;'''
19 ); 17 );
20 18
21 static final Style _spacerStyle = new Style(''' 19 static final FlexBoxParentData _spacerParentData = new FlexBoxParentData()..fl ex = 1;
22 flex: 1'''
23 );
24 20
25 static final Style _labelStyle = new Style(''' 21 static final Style _labelStyle = new Style('''
26 padding: 0 16px;''' 22 padding: 0 16px;'''
27 ); 23 );
28 24
29 List<UINode> children; 25 List<UINode> children;
30 26
31 DrawerHeader({ Object key, this.children }) : super(key: key); 27 DrawerHeader({ Object key, this.children }) : super(key: key);
32 28
33 UINode build() { 29 UINode build() {
34 return new Container( 30 return new FlexContainer(
31 direction: FlexDirection.Column,
35 style: _style, 32 style: _style,
36 children: [ 33 children: [
37 new Container( 34 new ParentDataNode(
38 key: 'Spacer', 35 new Container(key: 'Spacer'),
39 style: _spacerStyle 36 _spacerParentData
40 ), 37 ),
41 new Container( 38 new Container(
42 key: 'Label', 39 key: 'Label',
43 style: _labelStyle, 40 style: _labelStyle,
44 children: children 41 children: children
45 ) 42 )
46 ] 43 ]
47 ); 44 );
48 } 45 }
49 } 46 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698