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

Commit 5e674182 authored by Samuel Fufa's avatar Samuel Fufa Committed by android-build-merger
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
am: e5865a03

Change-Id: I72ff45bd7080a7bb6ca4ab681423d6bd1da8a291
parents 7949c5a7 e5865a03
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -111,6 +111,7 @@ public class DeviceProfile {


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


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


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


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


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