diff options
author | Tony <twickham@google.com> | 2018-07-22 13:07:04 -0700 |
---|---|---|
committer | Tony <twickham@google.com> | 2018-07-22 13:49:01 -0700 |
commit | dfb785afc168f51d082382eca5a1d97e3f733734 (patch) | |
tree | 1330e4b61fa6fd7f14d33e589d56964baae28a1f | |
parent | d63e6dff2888686b075547ded2c3ad7b236a45e3 (diff) | |
download | android_packages_apps_Trebuchet-dfb785afc168f51d082382eca5a1d97e3f733734.tar.gz android_packages_apps_Trebuchet-dfb785afc168f51d082382eca5a1d97e3f733734.tar.bz2 android_packages_apps_Trebuchet-dfb785afc168f51d082382eca5a1d97e3f733734.zip |
Fix gap between notification dots and their shadows
There was a rounding issue due to usnig integer division when we meant float
Bug: 73331123
Change-Id: Ic3deb1c26aa00808a929e1303602656ce532963d
-rw-r--r-- | src/com/android/launcher3/graphics/ShadowGenerator.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/launcher3/graphics/ShadowGenerator.java b/src/com/android/launcher3/graphics/ShadowGenerator.java index 5fbf502aa..88da853d6 100644 --- a/src/com/android/launcher3/graphics/ShadowGenerator.java +++ b/src/com/android/launcher3/graphics/ShadowGenerator.java @@ -126,13 +126,13 @@ public class ShadowGenerator { } public Bitmap createPill(int width, int height) { - radius = height / 2; + radius = height / 2f; - int centerX = Math.round(width / 2 + shadowBlur); + int centerX = Math.round(width / 2f + shadowBlur); int centerY = Math.round(radius + shadowBlur + keyShadowDistance); int center = Math.max(centerX, centerY); bounds.set(0, 0, width, height); - bounds.offsetTo(center - width / 2, center - height / 2); + bounds.offsetTo(center - width / 2f, center - height / 2f); int size = center * 2; Bitmap result = Bitmap.createBitmap(size, size, Config.ARGB_8888); |