Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9be3585f authored by Hyunyoung Song's avatar Hyunyoung Song Committed by android-build-merger
Browse files

Merge "Prevent clipping on the top and left side on AdaptiveIconDrawables...

Merge "Prevent clipping on the top and left side on AdaptiveIconDrawables b/62372639" into ub-launcher3-dorval
am: 88082394

Change-Id: I7148678d490c55e9a10e672cba839ef8aef9d00a
parents 7e6e96da 88082394
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -266,9 +266,10 @@ public class LauncherIcons {

            sOldBounds.set(icon.getBounds());
            if (Utilities.isAtLeastO() && icon instanceof AdaptiveIconDrawable) {
                int offset = Math.min(left, top);
                int offset = Math.max((int)(ShadowGenerator.BLUR_FACTOR * iconBitmapSize),
                        Math.min(left, top));
                int size = Math.max(width, height);
                icon.setBounds(offset, offset, offset + size, offset + size);
                icon.setBounds(offset, offset, size, size);
            } else {
                icon.setBounds(left, top, left+width, top+height);
            }
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ public class ShadowGenerator {

    // Percent of actual icon size
    private static final float HALF_DISTANCE = 0.5f;
    private static final float BLUR_FACTOR = 0.5f/48;
    public static final float BLUR_FACTOR = 0.5f/48;

    // Percent of actual icon size
    private static final float KEY_SHADOW_DISTANCE = 1f/48;