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

Side by Side Diff: sky/sdk/lib/framework/components2/drawer.dart

Issue 1169813009: Add TODOs about components needing to adjust to screen size changes. (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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/floating_action_button.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/animated_value.dart'; 5 import '../animation/animated_value.dart';
6 import '../animation/curves.dart'; 6 import '../animation/curves.dart';
7 import '../fn2.dart'; 7 import '../fn2.dart';
8 import '../theme2/colors.dart'; 8 import '../theme2/colors.dart';
9 import '../theme2/shadows.dart'; 9 import '../theme2/shadows.dart';
10 import 'animated_component.dart'; 10 import 'animated_component.dart';
11 import 'dart:math' as math; 11 import 'dart:math' as math;
12 import 'dart:sky' as sky; 12 import 'dart:sky' as sky;
13 import 'material.dart'; 13 import 'material.dart';
14 import 'package:vector_math/vector_math.dart'; 14 import 'package:vector_math/vector_math.dart';
15 15
16 // TODO(eseidel): Draw width should vary based on device size:
17 // http://www.google.com/design/spec/layout/structure.html#structure-side-nav
18
19 // Mobile:
20 // Width = Screen width − 56 dp
21 // Maximum width: 320dp
22 // Maximum width applies only when using a left nav. When using a right nav,
23 // the panel can cover the full width of the screen.
24
25 // Desktop/Tablet:
26 // Maximum width for a left nav is 400dp.
27 // The right nav can vary depending on content.
28
16 const double _kWidth = 304.0; 29 const double _kWidth = 304.0;
17 const double _kMinFlingVelocity = 0.4; 30 const double _kMinFlingVelocity = 0.4;
18 const double _kBaseSettleDurationMS = 246.0; 31 const double _kBaseSettleDurationMS = 246.0;
19 const double _kMaxSettleDurationMS = 600.0; 32 const double _kMaxSettleDurationMS = 600.0;
20 const Curve _kAnimationCurve = parabolicRise; 33 const Curve _kAnimationCurve = parabolicRise;
21 34
22 typedef void DrawerStatusChangeHandler (bool showing); 35 typedef void DrawerStatusChangeHandler (bool showing);
23 36
24 class DrawerController { 37 class DrawerController {
25 38
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 children: [ mask, content ] 158 children: [ mask, content ]
146 ), 159 ),
147 onPointerDown: controller.handlePointerDown, 160 onPointerDown: controller.handlePointerDown,
148 onPointerMove: controller.handlePointerMove, 161 onPointerMove: controller.handlePointerMove,
149 onPointerUp: controller.handlePointerUp, 162 onPointerUp: controller.handlePointerUp,
150 onPointerCancel: controller.handlePointerCancel 163 onPointerCancel: controller.handlePointerCancel
151 ); 164 );
152 } 165 }
153 166
154 } 167 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/floating_action_button.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698