Bug 1117130 - Offset overlap by an additional pixel for fade in toolbar. r=trivial, a=sledru
authorMichael Comella <michael.l.comella@gmail.com>
Tue, 27 Jan 2015 16:12:16 -0800
changeset 243079 4b9480a0f719
parent 243078 5af391c10cbe
child 243080 897f73d9e4f9
push id4383
push userryanvm@gmail.com
push date2015-01-28 15:06 +0000
treeherdermozilla-beta@897f73d9e4f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstrivial, sledru
bugs1117130
milestone36.0
Bug 1117130 - Offset overlap by an additional pixel for fade in toolbar. r=trivial, a=sledru
mobile/android/base/widget/FadedMultiColorTextView.java
--- a/mobile/android/base/widget/FadedMultiColorTextView.java
+++ b/mobile/android/base/widget/FadedMultiColorTextView.java
@@ -52,18 +52,18 @@ public class FadedMultiColorTextView ext
             final int right = getWidth() - getCompoundPaddingRight();
             final float left = right - fadeWidth;
 
             updateGradientShader(needsEllipsis, right);
 
             final float center = getHeight() / 2;
 
             // Shrink height of gradient to prevent it overlaying parent view border.
-            final float top = center - getTextSize() + 1;
-            final float bottom = center + getTextSize() - 1;
+            final float top = center - getTextSize() + 2;
+            final float bottom = center + getTextSize() - 2;
 
             canvas.drawRect(left, top, right, bottom, fadePaint);
         }
     }
 
     private void updateGradientShader(final boolean needsEllipsis, final int gradientEndRight) {
         final int backgroundColor =
                 fadeBackgroundColorList.getColorForState(getDrawableState(), Color.RED);