Update icon and text size for two panel home screen

Adding new field for landscape icon text size and changing
the logic for when to use landscape sizes.

Test: manual
Bug: 182796672
Change-Id: I89833e8fd90f2606937c3b95ac10229a042213ec
This commit is contained in:
Andras Kloczl committed 2021-04-08 15:27:27 +02:00
1 parent adfbdcf8fe
commit 6057cb9fe6
3 files changed
+13 -2

No files matched your search

+3 -2
View File
@@ -506,9 +506,10 @@ public class DeviceProfile {
// Workspace
final boolean isVerticalLayout = isVerticalBarLayout();
float invIconSizeDp = isVerticalLayout ? inv.landscapeIconSize : inv.iconSize;
float invIconSizeDp = isLandscape ? inv.landscapeIconSize : inv.iconSize;
iconSizePx = Math.max(1, pxFromDp(invIconSizeDp, mInfo.metrics, scale));
iconTextSizePx = (int) (Utilities.pxFromSp(inv.iconTextSize, mInfo.metrics) * scale);
float invIconTextSizeSp = isLandscape ? inv.landscapeIconTextSize : inv.iconTextSize;
iconTextSizePx = (int) (Utilities.pxFromSp(invIconTextSizeSp, mInfo.metrics) * scale);
iconDrawablePaddingPx = (int) (iconDrawablePaddingOriginalPx * scale);
setCellLayoutBorderSpacing((int) (cellLayoutBorderSpacingOriginalPx * scale));