summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/BubbleTextView.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index b957c47..adc153f 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -172,6 +172,12 @@ public class BubbleTextView extends TextView
boolean promiseStateChanged) {
Bitmap b = info.getIcon(iconCache);
+ if (b.getWidth() > mIconSize || b.getHeight() > mIconSize) {
+ b = Bitmap.createScaledBitmap(b, mIconSize, mIconSize, false);
+ info.setIcon(b);
+ info.updateIcon(iconCache);
+ }
+
FastBitmapDrawable iconDrawable = mLauncher.createIconDrawable(b);
iconDrawable.setGhostModeEnabled(info.isDisabled != 0);