Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d39707b6 authored by Jonathan Miranda's avatar Jonathan Miranda
Browse files

Factor in CellLayout padding in cell size calculation. am: 8632d9dd

Change-Id: I5cf4a8b9ad63ce87efa88708cb4a99439497326c
parents 21ae7d7c 8632d9dd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -436,7 +436,8 @@ public class DeviceProfile {
        // Since we are only concerned with the overall padding, layout direction does
        // not matter.
        Point padding = getTotalWorkspacePadding();
        result.x = calculateCellWidth(availableWidthPx - padding.x, inv.numColumns);
        int cellPadding = cellLayoutPaddingLeftRightPx * 2;
        result.x = calculateCellWidth(availableWidthPx - padding.x - cellPadding, inv.numColumns);
        result.y = calculateCellHeight(availableHeightPx - padding.y, inv.numRows);
        return result;
    }