mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Update Folders to match spec.
Bug: 63825895 Change-Id: Ia1a139f1afd944eefcd370645142227317e2bf20
This commit is contained in:
@@ -108,6 +108,7 @@ public class DeviceProfile {
|
||||
public int folderChildIconSizePx;
|
||||
public int folderChildTextSizePx;
|
||||
public int folderChildDrawablePaddingPx;
|
||||
public final int folderChildDrawablePaddingOriginalPx;
|
||||
|
||||
// Hotseat
|
||||
public int hotseatCellHeightPx;
|
||||
@@ -220,6 +221,9 @@ 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;
|
||||
@@ -390,15 +394,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 = Math.max(0,
|
||||
(folderCellHeightPx - folderChildIconSizePx - textHeight) / 3);
|
||||
folderCellHeightPx = folderChildIconSizePx + 2 * cellPaddingY + textHeight
|
||||
+ folderChildDrawablePaddingPx;
|
||||
}
|
||||
|
||||
public void updateInsets(Rect insets) {
|
||||
|
||||
Reference in New Issue
Block a user