提交 ba2fb3cf 编写于 作者: M Matt Perry

Fix regressions with Drawer animations that I introduced.

- The drawer mask was too dark.
- The drawer didn't track the user's finger when dragging.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1220973005.
上级 edbb38a5
......@@ -27,7 +27,10 @@ import 'theme.dart';
const double _kWidth = 304.0;
const double _kMinFlingVelocity = 0.4;
const int _kBaseSettleDurationMS = 246;
const Curve _kAnimationCurve = parabolicRise;
// TODO(mpcomplete): The curve must be linear if we want the drawer to track
// the user's finger. Odeon remedies this by attaching spring forces to the
// initial timeline when animating (so it doesn't look linear).
const Curve _kAnimationCurve = linear;
typedef void DrawerStatusChangeHandler (bool showing);
......@@ -117,7 +120,7 @@ class Drawer extends AnimatedComponent {
// like fades, slides, rotates, pinch, etc.
Widget build() {
// TODO(mpcomplete): animate as a fade-in.
double scaler = controller.performance.progress + 1.0;
double scaler = controller.performance.progress;
Color maskColor = new Color.fromARGB((0x7F * scaler).floor(), 0, 0, 0);
var mask = new Listener(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册