Merge "Change rule so that multi-window labels are shown if there is space." into ub-launcher3-master

This commit is contained in:
TreeHugger Robot
2017-09-20 15:47:26 +00:00
committed by Android (Google) Code Review
+6 -2
View File
@@ -277,8 +277,12 @@ public class DeviceProfile {
DeviceProfile profile = new DeviceProfile(context, inv, mwSize, mwSize, mwSize.x, mwSize.y,
isLandscape);
// Hide labels on the workspace.
profile.adjustToHideWorkspaceLabels();
// If there isn't enough vertical cell padding with the labels displayed, hide the labels.
float workspaceCellPaddingY = profile.getCellSize().y - profile.iconSizePx
- iconDrawablePaddingPx - profile.iconTextSizePx;
if (workspaceCellPaddingY < profile.iconDrawablePaddingPx * 2) {
profile.adjustToHideWorkspaceLabels();
}
// We use these scales to measure and layout the widgets using their full invariant profile
// sizes and then draw them scaled and centered to fit in their multi-window mode cellspans.