summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorJonathan Miranda <jonmiranda@google.com>2017-07-26 18:16:01 +0000
committerJonathan Miranda <jonmiranda@google.com>2017-07-26 18:16:01 +0000
commitf2974a5c2ac6bf35cef3435e672fecdbc18619d2 (patch)
tree02286d97e95e8b80303f09c1793b4e89f9698c62 /src/com/android/launcher3/DeviceProfile.java
parentcab2e0e8a1ac529227a4b89646e44ba197087de2 (diff)
parent9ad87463a8e62cb620c4a738ed9f534b9e9dfb9b (diff)
downloadandroid_packages_apps_Trebuchet-f2974a5c2ac6bf35cef3435e672fecdbc18619d2.tar.gz
android_packages_apps_Trebuchet-f2974a5c2ac6bf35cef3435e672fecdbc18619d2.tar.bz2
android_packages_apps_Trebuchet-f2974a5c2ac6bf35cef3435e672fecdbc18619d2.zip
[automerger] Revert "Update Folders to match spec." am: 9ad87463a8
Change-Id: I75ad19eba41a0bab0461a0255954092a4790c617
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index cb4ad55c7..bd239690f 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -108,7 +108,6 @@ public class DeviceProfile {
public int folderChildIconSizePx;
public int folderChildTextSizePx;
public int folderChildDrawablePaddingPx;
- public final int folderChildDrawablePaddingOriginalPx;
// Hotseat
public int hotseatCellHeightPx;
@@ -221,9 +220,6 @@ public class DeviceProfile {
hotseatLandRightNavBarGutterPx = res.getDimensionPixelSize(
R.dimen.dynamic_grid_hotseat_land_right_nav_bar_gutter_width);
- folderChildDrawablePaddingOriginalPx =
- res.getDimensionPixelSize(R.dimen.folder_child_icon_drawable_padding);
-
// Determine sizes.
widthPx = width;
heightPx = height;
@@ -403,15 +399,15 @@ public class DeviceProfile {
folderChildIconSizePx = (int) (Utilities.pxFromDp(inv.iconSize, dm) * scale);
folderChildTextSizePx =
(int) (res.getDimensionPixelSize(R.dimen.folder_child_text_size) * scale);
- folderChildDrawablePaddingPx = (int) (folderChildDrawablePaddingOriginalPx * scale);
int textHeight = Utilities.calculateTextHeight(folderChildTextSizePx);
int cellPaddingX = (int) (res.getDimensionPixelSize(R.dimen.folder_cell_x_padding) * scale);
int cellPaddingY = (int) (res.getDimensionPixelSize(R.dimen.folder_cell_y_padding) * scale);
folderCellWidthPx = folderChildIconSizePx + 2 * cellPaddingX;
- folderCellHeightPx = folderChildIconSizePx + 2 * cellPaddingY + textHeight
- + folderChildDrawablePaddingPx;
+ folderCellHeightPx = folderChildIconSizePx + 2 * cellPaddingY + textHeight;
+ folderChildDrawablePaddingPx = Math.max(0,
+ (folderCellHeightPx - folderChildIconSizePx - textHeight) / 3);
}
public void updateInsets(Rect insets) {