mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Update two panel specific launcher home icon sizing
Test: manual Bug: 191879424 Change-Id: I4f51616004d78036ad801298bb5ba72af8de3f30
This commit is contained in:
@@ -612,12 +612,30 @@ public class DeviceProfile {
|
||||
iconScale = Math.min(1f, scale);
|
||||
cellScaleToFit = scale;
|
||||
|
||||
|
||||
// Workspace
|
||||
final boolean isVerticalLayout = isVerticalBarLayout();
|
||||
float invIconSizeDp = isLandscape ? inv.landscapeIconSize : inv.iconSize;
|
||||
float invIconSizeDp;
|
||||
float invIconTextSizeSp;
|
||||
|
||||
if (isTwoPanels) {
|
||||
if (isLandscape) {
|
||||
invIconSizeDp = inv.twoPanelLandscapeIconSize;
|
||||
invIconTextSizeSp = inv.twoPanelLandscapeIconTextSize;
|
||||
} else {
|
||||
invIconSizeDp = inv.twoPanelPortraitIconSize;
|
||||
invIconTextSizeSp = inv.twoPanelPortraitIconTextSize;
|
||||
}
|
||||
} else {
|
||||
if (isLandscape) {
|
||||
invIconSizeDp = inv.landscapeIconSize;
|
||||
invIconTextSizeSp = inv.landscapeIconTextSize;
|
||||
} else {
|
||||
invIconSizeDp = inv.iconSize;
|
||||
invIconTextSizeSp = inv.iconTextSize;
|
||||
}
|
||||
}
|
||||
|
||||
iconSizePx = Math.max(1, pxFromDp(invIconSizeDp, mMetrics, iconScale));
|
||||
float invIconTextSizeSp = isLandscape ? inv.landscapeIconTextSize : inv.iconTextSize;
|
||||
iconTextSizePx = (int) (pxFromSp(invIconTextSizeSp, mMetrics) * iconScale);
|
||||
iconDrawablePaddingPx = (int) (iconDrawablePaddingOriginalPx * iconScale);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user