summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2018-05-25 16:30:23 -0700
committerHyunyoung Song <hyunyoungs@google.com>2018-05-25 16:30:23 -0700
commit49df554dc22521b2b4cb56f879846ccce81f4e0d (patch)
treef496caba020aeedd3f5717545db6dcc47eaf64de
parentdb9f86a472844aa3a24c422983839ffd0253e2f8 (diff)
downloadandroid_packages_apps_Trebuchet-49df554dc22521b2b4cb56f879846ccce81f4e0d.tar.gz
android_packages_apps_Trebuchet-49df554dc22521b2b4cb56f879846ccce81f4e0d.tar.bz2
android_packages_apps_Trebuchet-49df554dc22521b2b4cb56f879846ccce81f4e0d.zip
Fix clipping of adaptive icons
Bug:62372639 Context: only noticeable on large form factor AND Large display setting Ceiling operation is needed to calculate offset of the drawing. Change-Id: I7c77fa53f0811990b8cfdc3a12e2b43eb4d2d73e
-rw-r--r--src/com/android/launcher3/graphics/LauncherIcons.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/graphics/LauncherIcons.java b/src/com/android/launcher3/graphics/LauncherIcons.java
index f020d2d7c..89ba72abf 100644
--- a/src/com/android/launcher3/graphics/LauncherIcons.java
+++ b/src/com/android/launcher3/graphics/LauncherIcons.java
@@ -330,9 +330,9 @@ public class LauncherIcons implements AutoCloseable {
mOldBounds.set(icon.getBounds());
if (Utilities.ATLEAST_OREO && icon instanceof AdaptiveIconDrawable) {
- int offset = Math.max((int)(BLUR_FACTOR * textureWidth), Math.min(left, top));
+ int offset = Math.max((int) Math.ceil(BLUR_FACTOR * textureWidth), Math.max(left, top));
int size = Math.max(width, height);
- icon.setBounds(offset, offset, size, size);
+ icon.setBounds(offset, offset, offset + size, offset + size);
} else {
icon.setBounds(left, top, left+width, top+height);
}