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

Commit e5865a03 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Decouple grid size and widget preview size in WidgetsRecyclerView" into...

Merge "Decouple grid size and widget preview size in WidgetsRecyclerView" into ub-launcher3-qt-future-dev
parents af754b9a f1424a3b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ public class DeviceProfile {

    // All apps
    public int allAppsCellHeightPx;
    public int allAppsCellWidthPx;
    public int allAppsIconSizePx;
    public int allAppsIconDrawablePaddingPx;
    public float allAppsIconTextSizePx;
@@ -349,6 +350,7 @@ public class DeviceProfile {
            allAppsIconDrawablePaddingPx = iconDrawablePaddingPx;
            allAppsCellHeightPx = getCellSize().y;
        }
        allAppsCellWidthPx = allAppsIconSizePx + allAppsIconDrawablePaddingPx;

        if (isVerticalBarLayout()) {
            // Always hide the Workspace text with vertical bar layout.
+1 −1
Original line number Diff line number Diff line
@@ -450,7 +450,7 @@ public class WidgetPreviewLoader {

    private Bitmap generateShortcutPreview(BaseActivity launcher, ShortcutConfigActivityInfo info,
            int maxWidth, int maxHeight, Bitmap preview) {
        int iconSize = launcher.getDeviceProfile().iconSizePx;
        int iconSize = launcher.getDeviceProfile().allAppsIconSizePx;
        int padding = launcher.getResources()
                .getDimensionPixelSize(R.dimen.widget_preview_shortcut_padding);

+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ public class WidgetCell extends LinearLayout implements OnLayoutChangeListener {

    private void setContainerWidth() {
        DeviceProfile profile = mActivity.getDeviceProfile();
        mCellSize = (int) (profile.cellWidthPx * WIDTH_SCALE);
        mCellSize = (int) (profile.allAppsCellWidthPx * WIDTH_SCALE);
        mPresetPreviewSize = (int) (mCellSize * PREVIEW_SCALE);
    }