Bug 1059450 - Fix shape dimension in BackButton (r=mcomella)
authorLucas Rocha <lucasr@mozilla.com>
Mon, 01 Sep 2014 18:24:34 +0100
changeset 224405 dbedb33e649de522ea5432e4cc2f01897bcaa2f2
parent 224404 bab83a083c3a329c97ec784aba4fe1c389f5caf9
child 224406 11a82a8561004937b0b516b0948637a202bb8e15
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1059450
milestone34.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
Bug 1059450 - Fix shape dimension in BackButton (r=mcomella)
mobile/android/base/toolbar/BackButton.java
--- a/mobile/android/base/toolbar/BackButton.java
+++ b/mobile/android/base/toolbar/BackButton.java
@@ -44,20 +44,20 @@ public class BackButton extends ShapedBu
         mBorderPaint.setColor(isPrivate ? 0xFF363B40 : 0xFFB5B5B5);
     }
 
     @Override
     protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) {
         super.onSizeChanged(width, height, oldWidth, oldHeight);
 
         mPath.reset();
-        mPath.addCircle(width/2, height/2, width/2 - mBorderWidth, Path.Direction.CW);
+        mPath.addCircle(width/2, height/2, width/2, Path.Direction.CW);
 
         mBorderPath.reset();
-        mBorderPath.addCircle(width/2, height/2, (width/2) - mBorderWidth, Path.Direction.CW);
+        mBorderPath.addCircle(width/2, height/2, (width/2) - (mBorderWidth/2), Path.Direction.CW);
     }
 
     @Override
     public void draw(Canvas canvas) {
         mCanvasDelegate.draw(canvas, mPath, getWidth(), getHeight());
 
         // Draw the border on top.
         canvas.drawPath(mBorderPath, mBorderPaint);