diff options
| author | Amir Zaidi <azaidi@live.nl> | 2020-01-24 16:30:10 +0100 |
|---|---|---|
| committer | Semavi Ulusoy <doc.divxm@gmail.com> | 2022-04-22 23:34:46 +0300 |
| commit | 1c4bff873041325b9eb1a2bffb29d6aba7b0e0ad (patch) | |
| tree | fe447e0d59997f71fcab52f7927333364a1da003 | |
| parent | c63b2da3df5bb23dd1ecb3f24e46280a5a751c93 (diff) | |
Apply alpha from child icon to adaptive icon wrapper
Change-Id: I7bf707093d6d3f30ea8484df02df963f792f9635
Signed-off-by: DennySPb <dennyspb@gmail.com>
| -rw-r--r-- | iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java index 70013cc..b6c706f 100644 --- a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java +++ b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java @@ -306,6 +306,10 @@ public class BaseIconFactory implements AutoCloseable { scale = getNormalizer().getScale(icon, outIconBounds, dr.getIconMask(), outShape); if (!(icon instanceof AdaptiveIconDrawable) && !outShape[0] && (icon.getChangingConfigurations() & CONFIG_HINT_NO_WRAP) == 0) { + // If there is an alpha on the icon, apply it to the wrapper instead. + dr.setAlpha(icon.getAlpha()); + icon.setAlpha(0xFF); + FixedScaleDrawable fsd = ((FixedScaleDrawable) dr.getForeground()); fsd.setDrawable(icon); fsd.setScale(scale); |
