зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1010739 - Change curve shape to be more consistent with Australis (r=margaret)
This commit is contained in:
Родитель
49feae7c6d
Коммит
71c4d13a3e
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче