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

Side by Side Diff: sky/sdk/lib/framework/components2/fixed_height_scrollable.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 unified diff | Download patch
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/scroll_behavior.dart'; 5 import '../animation/scroll_behavior.dart';
6 import '../fn2.dart'; 6 import '../fn2.dart';
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 import 'package:vector_math/vector_math.dart'; 9 import 'package:vector_math/vector_math.dart';
10 import 'scrollable.dart'; 10 import 'scrollable.dart';
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 double drawStart = scrollOffset + alignmentDelta; 56 double drawStart = scrollOffset + alignmentDelta;
57 itemNumber = math.max(0, (drawStart / itemHeight).floor()); 57 itemNumber = math.max(0, (drawStart / itemHeight).floor());
58 58
59 transform.translate(0.0, alignmentDelta); 59 transform.translate(0.0, alignmentDelta);
60 } 60 }
61 } 61 }
62 62
63 return new SizeObserver( 63 return new SizeObserver(
64 callback: _handleSizeChanged, 64 callback: _handleSizeChanged,
65 child: new Clip( 65 child: new Clip(
66 child: new Transform( 66 child: new DecoratedBox(
67 transform: transform, 67 decoration: const BoxDecoration(
68 child: new BlockContainer( 68 backgroundColor: const Color(0xFFFFFFFF)
69 children: buildItems(itemNumber, itemCount)) 69 ),
70 child: new Transform(
71 transform: transform,
72 child: new BlockContainer(
73 children: buildItems(itemNumber, itemCount))
74 )
70 ) 75 )
71 ) 76 )
72 ); 77 );
73 } 78 }
74 79
75 List<UINode> buildItems(int start, int count); 80 List<UINode> buildItems(int start, int count);
76 } 81 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/components2/drawer.dart ('k') | sky/sdk/lib/framework/components2/tool_bar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698