mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
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:
@@ -106,6 +106,7 @@ public class InvariantDeviceProfile {
|
||||
public float iconSize;
|
||||
public String iconShapePath;
|
||||
public float landscapeIconSize;
|
||||
public float landscapeIconTextSize;
|
||||
public int iconBitmapSize;
|
||||
public int fillResIconDpi;
|
||||
public float iconTextSize;
|
||||
@@ -163,6 +164,7 @@ public class InvariantDeviceProfile {
|
||||
landscapeIconSize = p.landscapeIconSize;
|
||||
iconBitmapSize = p.iconBitmapSize;
|
||||
iconTextSize = p.iconTextSize;
|
||||
landscapeIconTextSize = p.landscapeIconTextSize;
|
||||
numHotseatIcons = p.numHotseatIcons;
|
||||
numAllAppsColumns = p.numAllAppsColumns;
|
||||
isScalable = p.isScalable;
|
||||
@@ -293,6 +295,7 @@ public class InvariantDeviceProfile {
|
||||
landscapeIconSize = displayOption.landscapeIconSize;
|
||||
iconBitmapSize = ResourceUtils.pxFromDp(iconSize, displayInfo.metrics);
|
||||
iconTextSize = displayOption.iconTextSize;
|
||||
landscapeIconTextSize = displayOption.landscapeIconTextSize;
|
||||
fillResIconDpi = getLauncherIconDensity(iconBitmapSize);
|
||||
|
||||
minCellHeight = displayOption.minCellHeight;
|
||||
@@ -678,6 +681,7 @@ public class InvariantDeviceProfile {
|
||||
private float iconSize;
|
||||
private float iconTextSize;
|
||||
private float landscapeIconSize;
|
||||
private float landscapeIconTextSize;
|
||||
private float allAppsIconSize;
|
||||
private float allAppsIconTextSize;
|
||||
|
||||
@@ -702,6 +706,8 @@ public class InvariantDeviceProfile {
|
||||
landscapeIconSize = a.getFloat(R.styleable.ProfileDisplayOption_landscapeIconSize,
|
||||
iconSize);
|
||||
iconTextSize = a.getFloat(R.styleable.ProfileDisplayOption_iconTextSize, 0);
|
||||
landscapeIconTextSize = a.getFloat(
|
||||
R.styleable.ProfileDisplayOption_landscapeIconTextSize, iconTextSize);
|
||||
|
||||
allAppsIconSize = a.getFloat(R.styleable.ProfileDisplayOption_allAppsIconSize,
|
||||
iconSize);
|
||||
@@ -731,6 +737,7 @@ public class InvariantDeviceProfile {
|
||||
landscapeIconSize *= w;
|
||||
allAppsIconSize *= w;
|
||||
iconTextSize *= w;
|
||||
landscapeIconTextSize *= w;
|
||||
allAppsIconTextSize *= w;
|
||||
minCellHeight *= w;
|
||||
minCellWidth *= w;
|
||||
@@ -744,6 +751,7 @@ public class InvariantDeviceProfile {
|
||||
landscapeIconSize += p.landscapeIconSize;
|
||||
allAppsIconSize += p.allAppsIconSize;
|
||||
iconTextSize += p.iconTextSize;
|
||||
landscapeIconTextSize += p.landscapeIconTextSize;
|
||||
allAppsIconTextSize += p.allAppsIconTextSize;
|
||||
minCellHeight += p.minCellHeight;
|
||||
minCellWidth += p.minCellWidth;
|
||||
|
||||
Reference in New Issue
Block a user