diff --git a/quickstep/res/drawable-hdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-hdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..d4f995d
--- /dev/null
+++ b/quickstep/res/drawable-hdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-hdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-hdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..9013c1a
--- /dev/null
+++ b/quickstep/res/drawable-hdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/res/drawable-mdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-mdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..6e924ec
--- /dev/null
+++ b/quickstep/res/drawable-mdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-mdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-mdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..33d0edd
--- /dev/null
+++ b/quickstep/res/drawable-mdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..20c85e6
--- /dev/null
+++ b/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..58a1ca0
--- /dev/null
+++ b/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..9d3dc31
--- /dev/null
+++ b/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..7fb248b
--- /dev/null
+++ b/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..49ec7aa
--- /dev/null
+++ b/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..a8922e2
--- /dev/null
+++ b/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/src/com/android/quickstep/RecentsView.java b/quickstep/src/com/android/quickstep/RecentsView.java
index 605c83c..836e713 100644
--- a/quickstep/src/com/android/quickstep/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/RecentsView.java
@@ -18,12 +18,25 @@
 
 import android.animation.LayoutTransition;
 import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapShader;
+import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.Paint;
+import android.graphics.PorterDuff.Mode;
+import android.graphics.PorterDuffXfermode;
 import android.graphics.Rect;
+import android.graphics.Shader;
+import android.graphics.Shader.TileMode;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.widget.FrameLayout;
 
 import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.Insettable;
 import com.android.launcher3.Launcher;
 import com.android.launcher3.PagedView;
 import com.android.launcher3.R;
@@ -48,7 +61,7 @@
 /**
  * A list of recent tasks.
  */
-public class RecentsView extends PagedView {
+public class RecentsView extends PagedView implements Insettable {
 
     private static final Rect sTempStableInsets = new Rect();
 
@@ -87,6 +100,12 @@
 
     private Task mFirstTask;
 
+    private Bitmap mScrim;
+    private Paint mFadePaint;
+    private Shader mFadeShader;
+    private Matrix mFadeMatrix;
+    private boolean mScrimOnLeft;
+
     public RecentsView(Context context) {
         this(context, null);
     }
@@ -99,8 +118,8 @@
         super(context, attrs, defStyleAttr);
         setPageSpacing(getResources().getDimensionPixelSize(R.dimen.recents_page_spacing));
         enableFreeScroll(true);
-        setClipChildren(true);
         setupLayoutTransition();
+        setClipToOutline(true);
 
         mLauncher = Launcher.getLauncher(context);
         mQuickScrubController = new QuickScrubController(mLauncher);
@@ -123,10 +142,6 @@
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
-
-        Rect padding =
-                getPadding(Launcher.getLauncher(getContext()).getDeviceProfile(), getContext());
-        setPadding(padding.left, padding.top, padding.right, padding.bottom);
         mFirstTaskIndex = getPageCount();
     }
 
@@ -148,6 +163,43 @@
         updateTaskStackListenerState();
     }
 
+    @Override
+    public void setInsets(Rect insets) {
+        mInsets.set(insets);
+        DeviceProfile dp = Launcher.getLauncher(getContext()).getDeviceProfile();
+        Rect padding = getPadding(dp, getContext());
+        FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
+        lp.bottomMargin = padding.bottom;
+        setLayoutParams(lp);
+
+        setPadding(padding.left, padding.top, padding.right, 0);
+
+        if (dp.isVerticalBarLayout()) {
+            boolean wasScrimOnLeft = mScrimOnLeft;
+            mScrimOnLeft = insets.left > insets.right;
+
+            if (mScrim == null || wasScrimOnLeft != mScrimOnLeft) {
+                Drawable scrim = getContext().getDrawable(mScrimOnLeft
+                        ? R.drawable.recents_horizontal_scrim_left
+                        : R.drawable.recents_horizontal_scrim_right);
+                if (scrim instanceof BitmapDrawable) {
+                    mScrim = ((BitmapDrawable) scrim).getBitmap();
+                    mFadePaint = new Paint();
+                    mFadePaint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
+                    mFadeShader = new BitmapShader(mScrim, TileMode.CLAMP, TileMode.REPEAT);
+                    mFadeMatrix = new Matrix();
+                } else {
+                    mScrim = null;
+                }
+            }
+        } else {
+            mScrim = null;
+            mFadePaint = null;
+            mFadeShader = null;
+            mFadeMatrix = null;
+        }
+    }
+
     public int getFirstTaskIndex() {
         return mFirstTaskIndex;
     }
@@ -234,10 +286,9 @@
         if (profile.isVerticalBarLayout()) {
             // Use the same padding on both sides for symmetry.
             float availableWidth = taskWidth - 2 * Math.max(padding.left, padding.right);
-            float availableHeight = profile.availableHeightPx - padding.top - padding.bottom
-                    - sTempStableInsets.top
-                    - profile.heightPx * (1 - OverviewState.getVerticalProgress(profile, context));
-
+            float availableHeight = profile.availableHeightPx - padding.top
+                    - sTempStableInsets.top - Math.max(padding.bottom,
+                    profile.heightPx * (1 - OverviewState.getVerticalProgress(profile, context)));
             float scaledRatio = Math.min(availableWidth / taskWidth, availableHeight / taskHeight);
             overviewHeight = taskHeight * scaledRatio;
             overviewWidth = taskWidth * scaledRatio;
@@ -306,11 +357,11 @@
         if (getPageCount() == 0 || getPageAt(0).getMeasuredWidth() == 0) {
             return;
         }
-        final int halfScreenWidth = getMeasuredWidth() / 2;
-        final int screenCenter = halfScreenWidth + getScrollX();
-        final int pageSpacing = mPageSpacing;
         final int halfPageWidth = mScrollState.halfPageWidth = getNormalChildWidth() / 2;
         mScrollState.lastScrollType = SCROLL_TYPE_NONE;
+        final int screenCenter = mInsets.left + getPaddingLeft() + getScrollX() + halfPageWidth;
+        final int halfScreenWidth = getMeasuredWidth() / 2;
+        final int pageSpacing = mPageSpacing;
 
         final int pageCount = getPageCount();
         for (int i = 0; i < pageCount; i++) {
@@ -399,6 +450,35 @@
         return mQuickScrubController;
     }
 
+    @Override
+    public void draw(Canvas canvas) {
+        if (mScrim == null) {
+            super.draw(canvas);
+            return;
+        }
+
+        final int flags = Canvas.HAS_ALPHA_LAYER_SAVE_FLAG;
+
+        int length = mScrim.getWidth();
+        int height = getHeight();
+        int saveCount = canvas.getSaveCount();
+
+        int scrimLeft;
+        if (mScrimOnLeft) {
+            scrimLeft = getScrollX();
+        } else {
+            scrimLeft = getScrollX() + getWidth() - length;
+        }
+        canvas.saveLayer(scrimLeft, 0, scrimLeft + length, height, null, flags);
+        super.draw(canvas);
+
+        mFadeMatrix.setTranslate(scrimLeft, 0);
+        mFadeShader.setLocalMatrix(mFadeMatrix);
+        mFadePaint.setShader(mFadeShader);
+        canvas.drawRect(scrimLeft, 0, scrimLeft + length, height, mFadePaint);
+        canvas.restoreToCount(saveCount);
+    }
+
     public interface PageCallbacks {
 
         /**
diff --git a/res/drawable/round_rect_primary.xml b/res/drawable/round_rect_primary.xml
index 2c47e06..9f8f4da 100644
--- a/res/drawable/round_rect_primary.xml
+++ b/res/drawable/round_rect_primary.xml
@@ -17,5 +17,5 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
     <solid android:color="?android:attr/colorPrimary" />
-    <corners android:radius="2dp" />
+    <corners android:radius="8dp" />
 </shape>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index a0aaca3..00ef8b2 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -43,9 +43,9 @@
     <dimen name="dynamic_grid_hotseat_side_padding">0dp</dimen>
 
     <!-- Hotseat/all-apps scrim -->
-    <dimen name="all_apps_scrim_radius">10dp</dimen>
-    <dimen name="all_apps_scrim_margin">10dp</dimen>
-    <dimen name="all_apps_scrim_blur">5dp</dimen>
+    <dimen name="all_apps_scrim_radius">8dp</dimen>
+    <dimen name="all_apps_scrim_margin">8dp</dimen>
+    <dimen name="all_apps_scrim_blur">4dp</dimen>
 
 <!-- Drop target bar -->
     <dimen name="dynamic_grid_drop_target_size">48dp</dimen>
@@ -203,7 +203,7 @@
     <dimen name="system_shortcut_header_icon_padding">12dp</dimen>
 
 <!-- Notifications -->
-    <dimen name="bg_round_rect_radius">12dp</dimen>
+    <dimen name="bg_round_rect_radius">8dp</dimen>
     <dimen name="notification_padding_start">16dp</dimen>
     <dimen name="notification_padding_end">12dp</dimen>
     <!-- notification_padding_end + (icon_size - footer_icon_size) / 2 -->
diff --git a/src/com/android/launcher3/util/TraceHelper.java b/src/com/android/launcher3/util/TraceHelper.java
index 0f3ac57..bde9c0a 100644
--- a/src/com/android/launcher3/util/TraceHelper.java
+++ b/src/com/android/launcher3/util/TraceHelper.java
@@ -55,7 +55,7 @@
     public static void partitionSection(String sectionName, String partition) {
         if (ENABLED) {
             MutableLong time = sUpTimes.get(sectionName);
-            if (time.value >= 0) {
+            if (time != null && time.value >= 0) {
 
                 if (SYSTEM_TRACE) {
                     Trace.endSection();
@@ -78,7 +78,7 @@
     public static void endSection(String sectionName, String msg) {
         if (ENABLED) {
             MutableLong time = sUpTimes.get(sectionName);
-            if (time.value >= 0) {
+            if (time != null && time.value >= 0) {
                 if (SYSTEM_TRACE) {
                     Trace.endSection();
                 }
