From 71c4d13a3eda197541956d485aacdd55ad326afa Mon Sep 17 00:00:00 2001 From: Lucas Rocha Date: Mon, 18 Aug 2014 10:40:07 +0100 Subject: [PATCH] Bug 1010739 - Change curve shape to be more consistent with Australis (r=margaret) --- mobile/android/base/toolbar/ShapedButton.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mobile/android/base/toolbar/ShapedButton.java b/mobile/android/base/toolbar/ShapedButton.java index aee24a3b902e..cde3aa306656 100644 --- a/mobile/android/base/toolbar/ShapedButton.java +++ b/mobile/android/base/toolbar/ShapedButton.java @@ -59,19 +59,22 @@ public class ShapedButton extends ThemedImageButton if (mSide == CurveTowards.NONE) return; - final int curve = (int) (height * 1.125f); - mPath.reset(); if (mSide == CurveTowards.RIGHT) { mPath.moveTo(0, 0); - mPath.cubicTo(curve * 0.75f, 0, - curve * 0.25f, height, - curve, height); + mPath.cubicTo(height * 0.25f, 0.0f, + height * 0.375f, height * 0.25f, + height * 0.375f, height * 0.5f); + mPath.cubicTo(height * 0.375f, height * 0.72f, + height * 0.527f, height * 0.961f, + height * 0.729f, height); mPath.lineTo(width, height); mPath.lineTo(width, 0); mPath.lineTo(0, 0); } else if (mSide == CurveTowards.LEFT) { + final int curve = (int) (height * 1.125f); + mPath.moveTo(width, 0); mPath.cubicTo((width - (curve * 0.75f)), 0, (width - (curve * 0.25f)), height,