Scale Icon badges for shortcut and widgets

Test: Manual
Bug: 141262820
Change-Id: I03edc986e3fe1876b6b7ed179b96864d587cb137
This commit is contained in:
Samuel Fufa committed 2019-10-04 17:06:33 -07:00
1 parent e5865a03bb
commit aa038af6b3
4 files changed
+23 -10

No files matched your search

+1 -1
View File
@@ -584,7 +584,7 @@ public final class Utilities {
LauncherIcons li = LauncherIcons.obtain(appState.getContext());
Bitmap badge = li.getShortcutInfoBadge(si, appState.getIconCache()).iconBitmap;
li.recycle();
float badgeSize = launcher.getResources().getDimension(R.dimen.profile_badge_size);
float badgeSize = iconSize * LauncherIcons.getBadgeSizeForIconSize(iconSize);
float insetFraction = (iconSize - badgeSize) / iconSize;
return new InsetDrawable(new FastBitmapDrawable(badge),
insetFraction, insetFraction, 0, 0);