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

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

Issue 1006053002: Allow Effen Styles to be extendable (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: sdfsd Created 5 years, 9 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/framework/components/checkbox.dart ('k') | sky/framework/components/drawer_header.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 '../animation/animation.dart'; 5 import '../animation/animation.dart';
6 import '../animation/curves.dart'; 6 import '../animation/curves.dart';
7 import '../fn.dart'; 7 import '../fn.dart';
8 import '../theme/colors.dart'; 8 import '../theme/colors.dart';
9 import '../theme/shadows.dart'; 9 import '../theme/shadows.dart';
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 Node build() { 143 Node build() {
144 _ensureListening(); 144 _ensureListening();
145 145
146 bool isClosed = _position <= -_kWidth; 146 bool isClosed = _position <= -_kWidth;
147 String inlineStyle = 'display: ${isClosed ? 'none' : ''}'; 147 String inlineStyle = 'display: ${isClosed ? 'none' : ''}';
148 String maskInlineStyle = 'opacity: ${(_position / _kWidth + 1) * 0.25}'; 148 String maskInlineStyle = 'opacity: ${(_position / _kWidth + 1) * 0.25}';
149 String contentInlineStyle = 'transform: translateX(${_position}px)'; 149 String contentInlineStyle = 'transform: translateX(${_position}px)';
150 150
151 Container mask = new Container( 151 Container mask = new Container(
152 key: 'Mask', 152 key: 'Mask',
153 styles: [_maskStyle], 153 style: _maskStyle,
154 inlineStyle: maskInlineStyle 154 inlineStyle: maskInlineStyle
155 )..events.listen('gesturetap', animation.handleMaskTap) 155 )..events.listen('gesturetap', animation.handleMaskTap)
156 ..events.listen('gestureflingstart', animation.handleFlingStart); 156 ..events.listen('gestureflingstart', animation.handleFlingStart);
157 157
158 Material content = new Material( 158 Material content = new Material(
159 key: 'Content', 159 key: 'Content',
160 styles: [_contentStyle], 160 style: _contentStyle,
161 inlineStyle: contentInlineStyle, 161 inlineStyle: contentInlineStyle,
162 children: children, 162 children: children,
163 level: level 163 level: level
164 ); 164 );
165 165
166 return new Container( 166 return new Container(
167 styles: [_style], 167 style: _style,
168 inlineStyle: inlineStyle, 168 inlineStyle: inlineStyle,
169 children: [ mask, content ] 169 children: [ mask, content ]
170 ); 170 );
171 } 171 }
172 } 172 }
OLDNEW
« no previous file with comments | « sky/framework/components/checkbox.dart ('k') | sky/framework/components/drawer_header.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698