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

Commit 596433d5 authored by Andrew Cole's avatar Andrew Cole
Browse files

Increase Themed Icon Size

In this CL we found that the current size of the icons does not correctly account for the size of the key shadow, which makes them slightly larger than the themed icons. We choose instead to increase the size of the themed icons and cut the shadow off slightly to be able to more easily fix the issue.

Bug: b/298203449
Test: TBD
Flag: None
Change-Id: Ia9ae7a1c20be24c639a1dc3542984ebd12c2523a
parent a3ebb332
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -419,6 +419,7 @@ public class BaseIconFactory implements AutoCloseable {
        mOldBounds.set(icon.getBounds());

        if (icon instanceof AdaptiveIconDrawable) {
            // We are ignoring KEY_SHADOW_DISTANCE because regular icons ignore this at the moment b/298203449
            int offset = Math.max((int) Math.ceil(BLUR_FACTOR * size),
                    Math.round(size * (1 - scale) / 2));
            // b/211896569: AdaptiveIconDrawable do not work properly for non top-left bounds
+2 −1
Original line number Diff line number Diff line
@@ -109,7 +109,8 @@ public class ShadowGenerator {
                scale = (HALF_DISTANCE - BLUR_FACTOR) / (HALF_DISTANCE - minSide);
            }

            float bottomSpace = BLUR_FACTOR + KEY_SHADOW_DISTANCE;
            // We are ignoring KEY_SHADOW_DISTANCE because regular icons ignore this at the moment b/298203449
            float bottomSpace = BLUR_FACTOR;
            if (bounds.bottom < bottomSpace) {
                scale = Math.min(scale,
                        (HALF_DISTANCE - bottomSpace) / (HALF_DISTANCE - bounds.bottom));