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

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

Issue 1158263005: Rename "BorderSide.None" to "BorderSide.none", since it's a constant, and change the sky.Size.infin… (Closed) Base URL: https://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 | « sky/examples/raw/touch_demo.dart ('k') | sky/sdk/lib/framework/components2/scaffold.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 '../rendering/box.dart'; 8 import '../rendering/box.dart';
9 import '../theme/colors.dart'; 9 import '../theme/colors.dart';
10 import 'animated_component.dart'; 10 import 'animated_component.dart';
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 109
110 UINode build() { 110 UINode build() {
111 Matrix4 transform = new Matrix4.identity(); 111 Matrix4 transform = new Matrix4.identity();
112 transform.translate(_position); 112 transform.translate(_position);
113 113
114 sky.Color maskColor = new sky.Color(((_position / _kWidth + 1) * 0xFF).floor () << 24); 114 sky.Color maskColor = new sky.Color(((_position / _kWidth + 1) * 0xFF).floor () << 24);
115 115
116 var mask = new EventListenerNode( 116 var mask = new EventListenerNode(
117 new Container( 117 new Container(
118 desiredSize: new sky.Size.infinite(), 118 desiredSize: sky.Size.infinite,
119 decoration: new BoxDecoration(backgroundColor: maskColor) 119 decoration: new BoxDecoration(backgroundColor: maskColor)
120 ), 120 ),
121 onGestureTap: controller.handleMaskTap, 121 onGestureTap: controller.handleMaskTap,
122 onGestureFlingStart: controller.handleFlingStart 122 onGestureFlingStart: controller.handleFlingStart
123 ); 123 );
124 124
125 Material content = new Material( 125 Material content = new Material(
126 content: new Container( 126 content: new Container(
127 decoration: new BoxDecoration(backgroundColor: new sky.Color(0xFFFFFFFF) ), 127 decoration: new BoxDecoration(backgroundColor: new sky.Color(0xFFFFFFFF) ),
128 desiredSize: new sky.Size.fromWidth(_kWidth), 128 desiredSize: new sky.Size.fromWidth(_kWidth),
129 transform: transform, 129 transform: transform,
130 child: new BlockContainer(children: children) 130 child: new BlockContainer(children: children)
131 ), 131 ),
132 level: level); 132 level: level);
133 133
134 return new EventListenerNode( 134 return new EventListenerNode(
135 new StackContainer( 135 new StackContainer(
136 children: [ mask, content ] 136 children: [ mask, content ]
137 ), 137 ),
138 onPointerDown: controller.handlePointerDown, 138 onPointerDown: controller.handlePointerDown,
139 onPointerMove: controller.handlePointerMove, 139 onPointerMove: controller.handlePointerMove,
140 onPointerUp: controller.handlePointerUp, 140 onPointerUp: controller.handlePointerUp,
141 onPointerCancel: controller.handlePointerCancel 141 onPointerCancel: controller.handlePointerCancel
142 ); 142 );
143 } 143 }
144 } 144 }
OLDNEW
« no previous file with comments | « sky/examples/raw/touch_demo.dart ('k') | sky/sdk/lib/framework/components2/scaffold.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698