diff --git a/src/com/android/launcher3/dragndrop/AddItemActivity.java b/src/com/android/launcher3/dragndrop/AddItemActivity.java
index 905a701..55be4a4 100644
--- a/src/com/android/launcher3/dragndrop/AddItemActivity.java
+++ b/src/com/android/launcher3/dragndrop/AddItemActivity.java
@@ -278,7 +278,7 @@
 
             @Override
             protected void onPostExecute(WidgetItem item) {
-                mWidgetCell.setPreviewSize(item.spanX, item.spanY);
+                mWidgetCell.setPreviewSize(item);
                 mWidgetCell.applyFromCellItem(item, mApp.getWidgetCache());
                 mWidgetCell.ensurePreview();
             }
diff --git a/src/com/android/launcher3/widget/WidgetCell.java b/src/com/android/launcher3/widget/WidgetCell.java
index 6605509..5759f75 100644
--- a/src/com/android/launcher3/widget/WidgetCell.java
+++ b/src/com/android/launcher3/widget/WidgetCell.java
@@ -209,8 +209,6 @@
         mWidgetPreviewLoader = loader;
         if (item.activityInfo != null) {
             setTag(new PendingAddShortcutInfo(item.activityInfo));
-            mPreviewWidth += mShortcutPreviewPadding;
-            mPreviewHeight += mShortcutPreviewPadding;
         } else {
             setTag(new PendingAddWidgetInfo(item.widgetInfo, mSourceContainer));
         }
@@ -357,16 +355,14 @@
     }
 
     /** Sets the widget preview image size in number of cells. */
-    public Size setPreviewSize(int spanX, int spanY) {
-        return setPreviewSize(spanX, spanY, 1f);
+    public Size setPreviewSize(WidgetItem widgetItem) {
+        return setPreviewSize(widgetItem, 1f);
     }
 
     /** Sets the widget preview image size, in number of cells, and preview scale. */
-    public Size setPreviewSize(int spanX, int spanY, float previewScale) {
+    public Size setPreviewSize(WidgetItem widgetItem, float previewScale) {
         DeviceProfile deviceProfile = mActivity.getDeviceProfile();
-        Size widgetSize =
-                mItem != null ? WidgetSizes.getWidgetItemSizePx(getContext(), deviceProfile, mItem)
-                : WidgetSizes.getWidgetSizePx(deviceProfile, spanX, spanY);
+        Size widgetSize = WidgetSizes.getWidgetItemSizePx(getContext(), deviceProfile, widgetItem);
         mPreviewWidth = widgetSize.getWidth();
         mPreviewHeight = widgetSize.getHeight();
         mPreviewScale = previewScale;
diff --git a/src/com/android/launcher3/widget/WidgetsBottomSheet.java b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
index 14aeaf6..406de10 100644
--- a/src/com/android/launcher3/widget/WidgetsBottomSheet.java
+++ b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
@@ -202,7 +202,7 @@
             tableRow.setGravity(Gravity.TOP);
             row.forEach(widgetItem -> {
                 WidgetCell widget = addItemCell(tableRow);
-                widget.setPreviewSize(widgetItem.spanX, widgetItem.spanY);
+                widget.setPreviewSize(widgetItem);
                 widget.applyFromCellItem(widgetItem, LauncherAppState.getInstance(mActivityContext)
                         .getWidgetCache());
                 widget.ensurePreview();
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java b/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java
index 57dec14..9c06558 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java
@@ -120,7 +120,7 @@
                 WidgetCell widget = (WidgetCell) row.getChildAt(j);
                 widget.clear();
                 WidgetItem widgetItem = widgetItemsPerRow.get(j);
-                Size previewSize = widget.setPreviewSize(widgetItem.spanX, widgetItem.spanY);
+                Size previewSize = widget.setPreviewSize(widgetItem);
                 widget.applyFromCellItem(widgetItem, mWidgetPreviewLoader);
                 widget.setApplyBitmapDeferred(mApplyBitmapDeferred);
                 Bitmap preview = mWidgetPreviewLoader.getPreview(widgetItem, previewSize);
diff --git a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
index 3800ede..0b8ca34 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
@@ -115,7 +115,7 @@
 
             for (WidgetItem widgetItem : widgetItems) {
                 WidgetCell widgetCell = addItemCell(tableRow);
-                widgetCell.setPreviewSize(widgetItem.spanX, widgetItem.spanY, data.mPreviewScale);
+                widgetCell.setPreviewSize(widgetItem, data.mPreviewScale);
                 widgetCell.applyFromCellItem(widgetItem,
                         LauncherAppState.getInstance(getContext()).getWidgetCache());
                 widgetCell.ensurePreview();
diff --git a/src/com/android/launcher3/widget/util/WidgetSizes.java b/src/com/android/launcher3/widget/util/WidgetSizes.java
index e2c84b5..451ed6e 100644
--- a/src/com/android/launcher3/widget/util/WidgetSizes.java
+++ b/src/com/android/launcher3/widget/util/WidgetSizes.java
@@ -32,6 +32,7 @@
 
 import com.android.launcher3.DeviceProfile;
 import com.android.launcher3.LauncherAppState;
+import com.android.launcher3.R;
 import com.android.launcher3.model.WidgetItem;
 
 import java.util.ArrayList;
@@ -91,7 +92,9 @@
     public static Size getWidgetItemSizePx(Context context, DeviceProfile profile,
             WidgetItem widgetItem) {
         if (widgetItem.isShortcut()) {
-            return getWidgetSizePx(profile, widgetItem.spanX, widgetItem.spanY);
+            int dimension = profile.allAppsIconSizePx + 2 * context.getResources()
+                    .getDimensionPixelSize(R.dimen.widget_preview_shortcut_padding);
+            return new Size(dimension, dimension);
         }
         return getWidgetPaddedSizePx(context, widgetItem.componentName, profile, widgetItem.spanX,
                 widgetItem.spanY);
