Bug 1117130 - URL bar border slightly covered by fading edge of title. r=mfinkle, a=sledru
authorMartyn Haigh <martyn.haigh@gmail.com>
Tue, 06 Jan 2015 17:44:25 +0000
changeset 242887 ca609e2e5bea
parent 242886 96d0d77a3462
child 242888 d185df72bd0e
push id4330
push userryanvm@gmail.com
push date2015-01-16 15:19 +0000
treeherdermozilla-beta@0b7d9ce1cdc7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, sledru
bugs1117130
milestone36.0
Bug 1117130 - URL bar border slightly covered by fading edge of title. r=mfinkle, a=sledru
mobile/android/base/widget/FadedMultiColorTextView.java
--- a/mobile/android/base/widget/FadedMultiColorTextView.java
+++ b/mobile/android/base/widget/FadedMultiColorTextView.java
@@ -50,18 +50,20 @@ public class FadedMultiColorTextView ext
         final boolean needsEllipsis = needsEllipsis();
         if (needsEllipsis) {
             final int right = getWidth() - getCompoundPaddingRight();
             final float left = right - fadeWidth;
 
             updateGradientShader(needsEllipsis, right);
 
             final float center = getHeight() / 2;
-            final float top = center - getTextSize();
-            final float bottom = center + getTextSize();
+
+            // Shrink height of gradient to prevent it overlaying parent view border.
+            final float top = center - getTextSize() + 1;
+            final float bottom = center + getTextSize() - 1;
 
             canvas.drawRect(left, top, right, bottom, fadePaint);
         }
     }
 
     private void updateGradientShader(final boolean needsEllipsis, final int gradientEndRight) {
         final int backgroundColor =
                 fadeBackgroundColorList.getColorForState(getDrawableState(), Color.RED);