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

Unified Diff: sky/sdk/lib/framework/components2/drawer_header.dart

Issue 1163633003: Port DrawerHeader to fn2 world. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove sky. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/components2/drawer_header.dart
diff --git a/sky/sdk/lib/framework/components2/drawer_header.dart b/sky/sdk/lib/framework/components2/drawer_header.dart
index 7b1da81dfc55c99305bd9e644e979a5a8745f91e..9c39817715c281e3e2a03faf6d43b4d3e37f2fa7 100644
--- a/sky/sdk/lib/framework/components2/drawer_header.dart
+++ b/sky/sdk/lib/framework/components2/drawer_header.dart
@@ -3,43 +3,48 @@
// found in the LICENSE file.
import '../fn2.dart';
-import '../theme/colors.dart';
-import '../theme/view_configuration.dart';
+import '../theme2/colors.dart';
+import '../theme2/view_configuration.dart';
class DrawerHeader extends Component {
- static final Style _style = new Style('''
- height: ${140 + kStatusBarHeight}px;
- background-color: ${BlueGrey[50]};
- border-bottom: 1px solid #D1D9E1;
- padding-bottom: 7px;
- margin-bottom: 8px;'''
- );
-
- static final FlexBoxParentData _spacerParentData = new FlexBoxParentData()..flex = 1;
-
- static final Style _labelStyle = new Style('''
- padding: 0 16px;'''
- );
List<UINode> children;
DrawerHeader({ Object key, this.children }) : super(key: key);
UINode build() {
- return new FlexContainer(
- direction: FlexDirection.vertical,
- style: _style,
- children: [
- new ParentDataNode(
- new Container(key: 'Spacer'),
- _spacerParentData
- ),
- new Container(
- key: 'Label',
- style: _labelStyle,
- children: children
+ return new Container(
+ key: 'drawer-header-outside',
+ desiredSize: const Size.fromHeight(kStatusBarHeight + kMaterialDrawerHeight),
+ decoration: new BoxDecoration(
+ backgroundColor: BlueGrey[50],
+ border: const Border(
+ bottom: const BorderSide(
+ color: const Color(0xFFD1D9E1),
+ width: 1.0
+ )
)
- ]
+ ),
+ padding: const EdgeDims.only(bottom: 7.0),
+ margin: const EdgeDims.only(bottom: 8.0),
+ child: new FlexContainer(
+ key: 'drawer-header-inside',
+ direction: FlexDirection.vertical,
+ children: [
+ new FlexExpandingChild(new Container(
+ key: 'drawer-header-spacer',
+ desiredSize: Size.infinite
+ )),
+ new Container(
+ key: 'drawer-header-label',
+ padding: const EdgeDims.symmetric(horizontal: 16.0),
+ child: new FlexContainer(
+ direction: FlexDirection.horizontal,
+ children: children
+ )
+ )
+ ]
+ )
);
}
}
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698