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
This commit is contained in:
@@ -330,9 +330,9 @@ public class LauncherIcons implements AutoCloseable {
|
|||||||
|
|
||||||
mOldBounds.set(icon.getBounds());
|
mOldBounds.set(icon.getBounds());
|
||||||
if (Utilities.ATLEAST_OREO && icon instanceof AdaptiveIconDrawable) {
|
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);
|
int size = Math.max(width, height);
|
||||||
icon.setBounds(offset, offset, size, size);
|
icon.setBounds(offset, offset, offset + size, offset + size);
|
||||||
} else {
|
} else {
|
||||||
icon.setBounds(left, top, left+width, top+height);
|
icon.setBounds(left, top, left+width, top+height);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user