mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Calculate all apps cell height based on actual sizes.
This ensures that the cell contents always fit.
Bug: 160716074
Change-Id: I3d85adec3e7e3652fe4a258bd659382a3e696211
Merged-In: I3d85adec3e7e3652fe4a258bd659382a3e696211
(cherry picked from commit 3535944395)
This commit is contained in:
committed by
Jonathan Miranda
parent
f130c29882
commit
f06e1b8b93
@@ -369,8 +369,10 @@ public class DeviceProfile {
|
||||
if (allAppsHasDifferentNumColumns()) {
|
||||
allAppsIconSizePx = ResourceUtils.pxFromDp(inv.allAppsIconSize, mInfo.metrics);
|
||||
allAppsIconTextSizePx = Utilities.pxFromSp(inv.allAppsIconTextSize, mInfo.metrics);
|
||||
allAppsCellHeightPx = getCellSize(inv.numAllAppsColumns, inv.numAllAppsColumns).y;
|
||||
allAppsIconDrawablePaddingPx = iconDrawablePaddingOriginalPx;
|
||||
// We use 4 below to ensure labels are closer to their corresponding icon.
|
||||
allAppsCellHeightPx = Math.round(allAppsIconSizePx + allAppsIconTextSizePx
|
||||
+ (4 * allAppsIconDrawablePaddingPx));
|
||||
} else {
|
||||
allAppsIconSizePx = iconSizePx;
|
||||
allAppsIconTextSizePx = iconTextSizePx;
|
||||
|
||||
Reference in New Issue
Block a user