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

Unified Diff: sky/sdk/lib/painting/box_painter.dart

Issue 1216013003: Fix the floating action button. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/painting/Rect.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/painting/box_painter.dart
diff --git a/sky/sdk/lib/painting/box_painter.dart b/sky/sdk/lib/painting/box_painter.dart
index b89b0f8abfd316c7723c34dd7e7e44bcb3087ec8..c975456deeffafafccb9b947f9883ad590c215a9 100644
--- a/sky/sdk/lib/painting/box_painter.dart
+++ b/sky/sdk/lib/painting/box_painter.dart
@@ -207,8 +207,7 @@ class BoxPainter {
case Shape.circle:
assert(_decoration.borderRadius == null);
Point center = rect.center;
- Size size = rect.size;
- double radius = math.min(size.width, size.height) / 2.0;
+ double radius = rect.shortestSide / 2.0;
canvas.drawCircle(center, radius, _backgroundPaint);
break;
case Shape.rectangle:
« no previous file with comments | « sky/engine/core/painting/Rect.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698