Loading src/com/android/launcher3/DeviceProfile.java +7 −6 Original line number Diff line number Diff line Loading @@ -403,14 +403,15 @@ public class DeviceProfile { Point totalWorkspacePadding = getTotalWorkspacePadding(); // Check if the icons fit within the available height. float usedHeight = folderCellHeightPx * inv.numFolderRows + folderBottomPanelSize; int maxHeight = availableHeightPx - totalWorkspacePadding.y - folderMargin; float scaleY = maxHeight / usedHeight; float contentUsedHeight = folderCellHeightPx * inv.numFolderRows; int contentMaxHeight = availableHeightPx - totalWorkspacePadding.y - folderBottomPanelSize - folderMargin; float scaleY = contentMaxHeight / contentUsedHeight; // Check if the icons fit within the available width. float usedWidth = folderCellWidthPx * inv.numFolderColumns; int maxWidth = availableWidthPx - totalWorkspacePadding.x - folderMargin; float scaleX = maxWidth / usedWidth; float contentUsedWidth = folderCellWidthPx * inv.numFolderColumns; int contentMaxWidth = availableWidthPx - totalWorkspacePadding.x - folderMargin; float scaleX = contentMaxWidth / contentUsedWidth; float scale = Math.min(scaleX, scaleY); if (scale < 1f) { Loading src/com/android/launcher3/folder/Folder.java +2 −2 Original line number Diff line number Diff line Loading @@ -993,8 +993,8 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo private int getContentAreaHeight() { DeviceProfile grid = mLauncher.getDeviceProfile(); int maxContentAreaHeight = grid.availableHeightPx - grid.getTotalWorkspacePadding().y - mFooterHeight; int maxContentAreaHeight = grid.availableHeightPx - grid.getTotalWorkspacePadding().y - mFooterHeight; int height = Math.min(maxContentAreaHeight, mContent.getDesiredHeight()); return Math.max(height, MIN_CONTENT_DIMEN); Loading Loading
src/com/android/launcher3/DeviceProfile.java +7 −6 Original line number Diff line number Diff line Loading @@ -403,14 +403,15 @@ public class DeviceProfile { Point totalWorkspacePadding = getTotalWorkspacePadding(); // Check if the icons fit within the available height. float usedHeight = folderCellHeightPx * inv.numFolderRows + folderBottomPanelSize; int maxHeight = availableHeightPx - totalWorkspacePadding.y - folderMargin; float scaleY = maxHeight / usedHeight; float contentUsedHeight = folderCellHeightPx * inv.numFolderRows; int contentMaxHeight = availableHeightPx - totalWorkspacePadding.y - folderBottomPanelSize - folderMargin; float scaleY = contentMaxHeight / contentUsedHeight; // Check if the icons fit within the available width. float usedWidth = folderCellWidthPx * inv.numFolderColumns; int maxWidth = availableWidthPx - totalWorkspacePadding.x - folderMargin; float scaleX = maxWidth / usedWidth; float contentUsedWidth = folderCellWidthPx * inv.numFolderColumns; int contentMaxWidth = availableWidthPx - totalWorkspacePadding.x - folderMargin; float scaleX = contentMaxWidth / contentUsedWidth; float scale = Math.min(scaleX, scaleY); if (scale < 1f) { Loading
src/com/android/launcher3/folder/Folder.java +2 −2 Original line number Diff line number Diff line Loading @@ -993,8 +993,8 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo private int getContentAreaHeight() { DeviceProfile grid = mLauncher.getDeviceProfile(); int maxContentAreaHeight = grid.availableHeightPx - grid.getTotalWorkspacePadding().y - mFooterHeight; int maxContentAreaHeight = grid.availableHeightPx - grid.getTotalWorkspacePadding().y - mFooterHeight; int height = Math.min(maxContentAreaHeight, mContent.getDesiredHeight()); return Math.max(height, MIN_CONTENT_DIMEN); Loading