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

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

Issue 1168203004: Add material shadows to toolbar and drawer (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « no previous file | sky/sdk/lib/framework/components2/fixed_height_scrollable.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.dart
diff --git a/sky/sdk/lib/framework/components2/drawer.dart b/sky/sdk/lib/framework/components2/drawer.dart
index 02fa5a5f391a916986777a35b36a0822af500d6c..34f5c87aa8b61a5eb9f2d3315e80e1f397a47a42 100644
--- a/sky/sdk/lib/framework/components2/drawer.dart
+++ b/sky/sdk/lib/framework/components2/drawer.dart
@@ -5,7 +5,8 @@
import '../animation/animated_value.dart';
import '../animation/curves.dart';
import '../fn2.dart';
-import '../theme/colors.dart';
+import '../theme2/colors.dart';
+import '../theme2/shadows.dart';
import 'animated_component.dart';
import 'dart:math' as math;
import 'dart:sky' as sky;
@@ -110,7 +111,8 @@ class Drawer extends AnimatedComponent {
Matrix4 transform = new Matrix4.identity();
transform.translate(_position);
- Color maskColor = new Color(((_position / _kWidth + 1) * 0xFF).floor() << 24);
+ double scaler = _position / _kWidth + 1;
+ Color maskColor = new Color.fromARGB((0x7F * scaler).floor(), 0, 0, 0);
var mask = new EventListenerNode(
new Container(decoration: new BoxDecoration(backgroundColor: maskColor)),
@@ -118,14 +120,14 @@ class Drawer extends AnimatedComponent {
onGestureFlingStart: controller.handleFlingStart
);
- Material content = new Material(
- content: new Container(
- decoration: new BoxDecoration(backgroundColor: new Color(0xFFFFFFFF)),
- width: _kWidth,
- transform: transform,
- child: new BlockContainer(children: children)
- ),
- level: level);
+ Container content = new Container(
+ decoration: new BoxDecoration(
+ backgroundColor: Grey[50],
+ boxShadow: Shadow[level]),
+ width: _kWidth,
+ transform: transform,
+ child: new BlockContainer(children: children)
+ );
return new EventListenerNode(
new StackContainer(
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/fixed_height_scrollable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698