From ff6c960a1af10f9229ee3d4dee2d704e25f90d44 Mon Sep 17 00:00:00 2001 From: Dayona Joseph Date: Fri, 24 Apr 2020 12:18:11 +0530 Subject: [PATCH 1/2] Tiny app icons in group icon --- .../e/blisslauncher/core/utils/GraphicsUtil.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/foundation/e/blisslauncher/core/utils/GraphicsUtil.java b/app/src/main/java/foundation/e/blisslauncher/core/utils/GraphicsUtil.java index 73353637ba..ac67cdc26d 100755 --- a/app/src/main/java/foundation/e/blisslauncher/core/utils/GraphicsUtil.java +++ b/app/src/main/java/foundation/e/blisslauncher/core/utils/GraphicsUtil.java @@ -119,11 +119,9 @@ public class GraphicsUtil { return bitmap; } - if (bitmap.getWidth() > appIconWidth) { - bitmap = Bitmap.createScaledBitmap(bitmap, appIconWidth, - (appIconWidth * bitmap.getHeight() / bitmap.getWidth()), - true); - } + bitmap = Bitmap.createScaledBitmap(bitmap, appIconWidth, + (appIconWidth * bitmap.getHeight() / bitmap.getWidth()), + true); int width = appIconWidth; int height = width; -- GitLab From 7943c20cde7e3257e41883e9274f4f91783d9336 Mon Sep 17 00:00:00 2001 From: Dayona Joseph Date: Mon, 4 May 2020 12:48:04 +0530 Subject: [PATCH 2/2] set folder icon size --- .../e/blisslauncher/core/utils/GraphicsUtil.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/foundation/e/blisslauncher/core/utils/GraphicsUtil.java b/app/src/main/java/foundation/e/blisslauncher/core/utils/GraphicsUtil.java index ac67cdc26d..05296a8c57 100755 --- a/app/src/main/java/foundation/e/blisslauncher/core/utils/GraphicsUtil.java +++ b/app/src/main/java/foundation/e/blisslauncher/core/utils/GraphicsUtil.java @@ -49,7 +49,7 @@ public class GraphicsUtil { * However, if more than 4 drawables are provided, only the first 4 are used. */ public Drawable generateFolderIcon(Context context, Drawable... sources) { - int width = sources[0].getIntrinsicWidth(); + int width = appIconWidth; int height = width; // Square icons Log.i(TAG, "generateFolderIcon: " + width + "*" + height); @@ -118,10 +118,11 @@ public class GraphicsUtil { true); return bitmap; } - - bitmap = Bitmap.createScaledBitmap(bitmap, appIconWidth, - (appIconWidth * bitmap.getHeight() / bitmap.getWidth()), - true); + if (bitmap.getWidth() >= appIconWidth) { + bitmap = Bitmap.createScaledBitmap(bitmap, appIconWidth, + (appIconWidth * bitmap.getHeight() / bitmap.getWidth()), + true); + } int width = appIconWidth; int height = width; -- GitLab