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

Unified Diff: sky/framework/components/drawer.dart

Issue 1012463003: Make Sky's drawer match Material Design spec (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: nits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/framework/animation/curves.dart ('k') | sky/framework/components/floating_action_button.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/components/drawer.dart
diff --git a/sky/framework/components/drawer.dart b/sky/framework/components/drawer.dart
index e2cfc99a9952a0d8fea9568f5a929649397346f7..79710709ddde71086e3d32c2a60aa1cfa4f9730b 100644
--- a/sky/framework/components/drawer.dart
+++ b/sky/framework/components/drawer.dart
@@ -12,11 +12,11 @@ import 'dart:math' as math;
import 'dart:sky' as sky;
import 'material.dart';
-const double _kWidth = 256.0;
+const double _kWidth = 304.0;
const double _kMinFlingVelocity = 0.4;
const double _kBaseSettleDurationMS = 246.0;
const double _kMaxSettleDurationMS = 600.0;
-const Cubic _kAnimationCurve = easeOut;
+const Cubic _kAnimationCurve = parabolicRise;
class DrawerAnimation extends Animation {
Stream<double> get onPositionChanged => onValueChanged;
@@ -80,7 +80,6 @@ class DrawerAnimation extends Animation {
class Drawer extends Component {
static final Style _style = new Style('''
position: absolute;
- z-index: 2;
top: 0;
left: 0;
bottom: 0;
@@ -101,8 +100,7 @@ class Drawer extends Component {
background-color: ${Grey[50]};
will-change: transform;
position: absolute;
- z-index: 3;
- width: 256px;
+ width: 304px;
top: 0;
left: 0;
bottom: 0;'''
@@ -145,7 +143,7 @@ class Drawer extends Component {
bool isClosed = _position <= -_kWidth;
String inlineStyle = 'display: ${isClosed ? 'none' : ''}';
- String maskInlineStyle = 'opacity: ${(_position / _kWidth + 1) * 0.25}';
+ String maskInlineStyle = 'opacity: ${(_position / _kWidth + 1) * 0.5}';
String contentInlineStyle = 'transform: translateX(${_position}px)';
Container mask = new Container(
« no previous file with comments | « sky/framework/animation/curves.dart ('k') | sky/framework/components/floating_action_button.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698