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

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

Issue 1166203002: Rename Container's desiredSize argument to width and height arguments. (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/stocks2/lib/stock_row.dart ('k') | sky/sdk/lib/framework/components2/drawer.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 'package:sky/framework/theme2/colors.dart' as colors; 5 import 'package:sky/framework/theme2/colors.dart' as colors;
6 6
7 import 'dart:sky' as sky; 7 import 'dart:sky' as sky;
8 import '../fn2.dart'; 8 import '../fn2.dart';
9 import '../rendering/box.dart'; 9 import '../rendering/box.dart';
10 import '../rendering/object.dart'; 10 import '../rendering/object.dart';
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 UINode buildContent() { 26 UINode buildContent() {
27 // TODO(jackson): This should change colors with the theme 27 // TODO(jackson): This should change colors with the theme
28 sky.Color color = highlight ? colors.Purple[500] : const sky.Color(0x8A00000 0); 28 sky.Color color = highlight ? colors.Purple[500] : const sky.Color(0x8A00000 0);
29 const double edgeSize = 20.0; 29 const double edgeSize = 20.0;
30 const double edgeRadius = 1.0; 30 const double edgeRadius = 1.0;
31 return new EventListenerNode( 31 return new EventListenerNode(
32 new Container( 32 new Container(
33 margin: const EdgeDims.symmetric(horizontal: 5.0), 33 margin: const EdgeDims.symmetric(horizontal: 5.0),
34 desiredSize: new sky.Size(edgeSize + 2.0, edgeSize + 2.0), 34 width: edgeSize + 2.0,
35 height: edgeSize + 2.0,
35 child: new CustomPaint( 36 child: new CustomPaint(
36 callback: (sky.Canvas canvas) { 37 callback: (sky.Canvas canvas) {
37 38
38 sky.Paint paint = new sky.Paint()..color = color 39 sky.Paint paint = new sky.Paint()..color = color
39 ..isAntiAlias = true 40 ..isAntiAlias = true
40 ..strokeWidth = 2.0; 41 ..strokeWidth = 2.0;
41 42
42 // Draw the outer rrect 43 // Draw the outer rrect
43 paint.setStyle(checked ? sky.PaintingStyle.strokeAndFill : sky.Paint ingStyle.stroke); 44 paint.setStyle(checked ? sky.PaintingStyle.strokeAndFill : sky.Paint ingStyle.stroke);
44 sky.Rect rect = new sky.Rect.fromLTRB(0.0, 0.0, edgeSize, edgeSize); 45 sky.Rect rect = new sky.Rect.fromLTRB(0.0, 0.0, edgeSize, edgeSize);
(...skipping 11 matching lines...) Expand all
56 path.lineTo(edgeSize * 0.8, edgeSize * 0.3); 57 path.lineTo(edgeSize * 0.8, edgeSize * 0.3);
57 canvas.drawPath(path, paint); 58 canvas.drawPath(path, paint);
58 } 59 }
59 } 60 }
60 ) 61 )
61 ), 62 ),
62 onGestureTap: _handleClick 63 onGestureTap: _handleClick
63 ); 64 );
64 } 65 }
65 } 66 }
OLDNEW
« no previous file with comments | « sky/examples/stocks2/lib/stock_row.dart ('k') | sky/sdk/lib/framework/components2/drawer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698