☠☠ backed out by d18d3e14ac3e ☠ ☠ | |
author | Lucas Rocha <lucasr@mozilla.com> |
Fri, 15 Aug 2014 18:23:17 +0100 | |
changeset 199844 | 8474627f88d5b09b9464b1c26302f423022566eb |
parent 199843 | cbb72f0aa5328b50dd8f2972c39d7015254a5719 |
child 199845 | aaa50f34df6d76847cf0745a098da2e5500a3a18 |
push id | 47750 |
push user | ryanvm@gmail.com |
push date | Fri, 15 Aug 2014 21:04:12 +0000 |
treeherder | mozilla-inbound@baea646f5a80 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | margaret |
bugs | 1010739 |
milestone | 34.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/mobile/android/base/toolbar/ShapedButton.java +++ b/mobile/android/base/toolbar/ShapedButton.java @@ -54,29 +54,32 @@ public class ShapedButton extends Themed @Override protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) { super.onSizeChanged(width, height, oldWidth, oldHeight); 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, (width - curve), height); mPath.lineTo(0, height); mPath.lineTo(0, 0); } }