Update hotseat sizing for 4x5 grids.
If the qsb bottom margin is smaller than the bottom insets,
we'll fall back to centering the qsb in the available freespace.
Bug: 194435265
Test: 4x5 grid
multiple devices,
with: gesture nav enabled
3 button nav enabled
Change-Id: I9fd4f0da3f2bc9f0b38a621ad1192533260379e3
This commit is contained in:
committed by
Jonathan Miranda
parent
749f913562
commit
374336a571
@@ -80,10 +80,10 @@
|
||||
launcher:b="16dp"/>
|
||||
<workspaceBottomPadding
|
||||
launcher:a="1"
|
||||
launcher:c="52dp"/>
|
||||
launcher:c="72dp"/>
|
||||
<hotseatBottomPadding
|
||||
launcher:a="0"
|
||||
launcher:b="36dp"/>
|
||||
launcher:b="56dp"/>
|
||||
</device-padding>
|
||||
|
||||
<device-padding
|
||||
@@ -93,10 +93,10 @@
|
||||
launcher:b="39dp"/>
|
||||
<workspaceBottomPadding
|
||||
launcher:a="1"
|
||||
launcher:c="75dp"/>
|
||||
launcher:c="95dp"/>
|
||||
<hotseatBottomPadding
|
||||
launcher:a="0"
|
||||
launcher:b="36dp"/>
|
||||
launcher:b="56dp"/>
|
||||
</device-padding>
|
||||
|
||||
<device-padding
|
||||
|
||||
@@ -830,11 +830,11 @@ public class DeviceProfile {
|
||||
? workspacePadding.bottom
|
||||
: hotseatBarSizePx - hotseatCellHeightPx - hotseatQsbHeight;
|
||||
|
||||
if (isScalableGrid) {
|
||||
if (isScalableGrid && qsbBottomMarginPx > mInsets.bottom) {
|
||||
return Math.min(qsbBottomMarginPx, freeSpace);
|
||||
} else {
|
||||
return (int) (freeSpace * QSB_CENTER_FACTOR)
|
||||
+ (isTaskbarPresent ? taskbarSize : getInsets().bottom);
|
||||
+ (isTaskbarPresent ? taskbarSize : mInsets.bottom);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user