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

Commit e0d16319 authored by Adnan Begovic's avatar Adnan Begovic
Browse files

iconloaderlib: Remove extra inset from monochrome layer in themed icons.

The `InsetDrawable` around the monochrome bitmap is removed, as the AdaptiveIconDrawable framework already provides the correct scaling and padding for the foreground layer.

In the "jump" path, the previous code takes the monochrome bitmap and first wraps it in an InsetDrawable, effectively shrinking it. Then, it passes this already shrunken drawable to AdaptiveIconDrawable, which applies its own inset logic again. This "double inset" makes the final monochrome icon's foreground smaller than a standard icon's foreground.

Bug: 441490810
Tested: Manually
Flag: EXEMPT BUGFIX
Change-Id: Ibcf6e0552b1af58610b9a45031000b9f915cdf1a
parent 68bbaee0
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -156,12 +156,9 @@ class MonoIconThemeController(
        // preserved in constantState
        // Inset the drawable according to the AdaptiveIconDrawable layers
        val monoDrawable =
            InsetDrawable(
            BitmapDrawable(themedBitmap.mono).apply {
                colorFilter = BlendModeColorFilter(colors[1], SRC_IN)
                },
                getExtraInsetFraction() / 2,
            )
            }
        return AdaptiveIconDrawable(ColorDrawable(colors[0]), monoDrawable)
    }
}