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

Unified Diff: sky/sdk/lib/framework/components2/radio.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 | « sky/sdk/lib/framework/components2/popup_menu_item.dart ('k') | sky/sdk/lib/framework/rendering/box.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/components2/radio.dart
diff --git a/sky/sdk/lib/framework/components2/radio.dart b/sky/sdk/lib/framework/components2/radio.dart
index 5e4be29be2d15079681122eda551275497f231e1..36134ed5d645b43c0a5fffc1727f98a587c32c7f 100644
--- a/sky/sdk/lib/framework/components2/radio.dart
+++ b/sky/sdk/lib/framework/components2/radio.dart
@@ -35,28 +35,28 @@ class Radio extends ButtonBase {
UINode buildContent() {
// TODO(jackson): This should change colors with the theme
Color color = highlight ? colors.Purple[500] : const Color(0x8A000000);
- const double diameter = 16.0;
- const double outerRadius = diameter / 2;
- const double innerRadius = 5.0;
+ const double kDiameter = 16.0;
+ const double kOuterRadius = kDiameter / 2;
+ const double kInnerRadius = 5.0;
return new EventListenerNode(
new Container(
margin: const EdgeDims.symmetric(horizontal: 5.0),
- width: diameter,
- height: diameter,
+ width: kDiameter,
+ height: kDiameter,
child: new CustomPaint(
- callback: (sky.Canvas canvas) {
+ callback: (sky.Canvas canvas, Size size) {
Paint paint = new Paint()..color = color;
// Draw the outer circle
paint.setStyle(sky.PaintingStyle.stroke);
paint.strokeWidth = 2.0;
- canvas.drawCircle(outerRadius, outerRadius, outerRadius, paint);
+ canvas.drawCircle(kOuterRadius, kOuterRadius, kOuterRadius, paint);
// Draw the inner circle
if (value == groupValue) {
paint.setStyle(sky.PaintingStyle.fill);
- canvas.drawCircle(outerRadius, outerRadius, innerRadius, paint);
+ canvas.drawCircle(kOuterRadius, kOuterRadius, kInnerRadius, paint);
}
}
)
« no previous file with comments | « sky/sdk/lib/framework/components2/popup_menu_item.dart ('k') | sky/sdk/lib/framework/rendering/box.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698