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

Commit 97e2f471 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix widget span" into tm-dev am: ec3723be

parents f05363a7 ec3723be
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -198,7 +198,9 @@ public abstract class BaseWidgetSheet extends AbstractSlideInView<Launcher>
    /** Returns the number of cells that can fit horizontally in a given {@code content}. */
    protected int computeMaxHorizontalSpans(View content, int contentHorizontalPaddingPx) {
        DeviceProfile deviceProfile = mActivityContext.getDeviceProfile();
        int availableWidth = content.getMeasuredWidth() - contentHorizontalPaddingPx;
        int availableWidth = content.getMeasuredWidth()
                - contentHorizontalPaddingPx
                - (2 * mContentHorizontalMarginInPx);
        Point cellSize = deviceProfile.getCellSize();
        if (cellSize.x > 0) {
            return availableWidth / cellSize.x;