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

Unified Diff: sky/examples/stocks2/lib/stock_arrow.dart

Issue 1175353002: Make the popup menu animation correct (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: style guide update 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/checkbox.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks2/lib/stock_arrow.dart
diff --git a/sky/examples/stocks2/lib/stock_arrow.dart b/sky/examples/stocks2/lib/stock_arrow.dart
index 3f2bab6ff2fbc7b1bc2b5edfdedf5600e67336c0..f78b253dc6655346aed4c9b9e6884c37cf7471fc 100644
--- a/sky/examples/stocks2/lib/stock_arrow.dart
+++ b/sky/examples/stocks2/lib/stock_arrow.dart
@@ -32,12 +32,12 @@ class StockArrow extends Component {
UINode build() {
// TODO(jackson): This should change colors with the theme
Color color = _colorForPercentChange(percentChange);
- const double size = 40.0;
- var arrow = new CustomPaint(callback: (sky.Canvas canvas) {
+ const double kSize = 40.0;
+ var arrow = new CustomPaint(callback: (sky.Canvas canvas, Size size) {
Paint paint = new Paint()..color = color;
paint.strokeWidth = 1.0;
var padding = paint.strokeWidth * 3.0;
- var r = size / 2.0 - padding;
+ var r = kSize / 2.0 - padding;
canvas.save();
canvas.translate(padding, padding);
@@ -68,8 +68,8 @@ class StockArrow extends Component {
return new Container(
child: arrow,
- width: size,
- height: size,
+ width: kSize,
+ height: kSize,
margin: const EdgeDims.symmetric(horizontal: 5.0));
}
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/checkbox.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698