From 47d7a500c631b7932ea70901c9f3081e94356ce2 Mon Sep 17 00:00:00 2001 From: pbzin Date: Fri, 28 Aug 2026 11:09:32 -0300 Subject: [PATCH 1/3] Launcher3: Unify bottom sheet drawer colors --- .../allapps/ActivityAllAppsContainerView.java | 32 +------------------ 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index 1f2e54bdc6..dbe4793712 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -191,8 +191,6 @@ public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { private float[] mBottomSheetCornerRadii; private ScrimView mScrimView; private int mHeaderColor; - private int mBottomSheetBackgroundColorOverBlur; - private int mBottomSheetBackgroundColorLegacy; private int mTabsProtectionAlpha; @Nullable private AllAppsTransitionController mAllAppsTransitionController; @@ -337,14 +335,6 @@ protected void onFinishInflate() { 0 // Bottom left }; - if (Flags.allAppsBlur()) { - int layerFg = getContext().getColor(R.color.blur_shade_panel_fg); - int layerBg = getContext().getColor(R.color.blur_shade_panel_bg); - mBottomSheetBackgroundColorOverBlur = ColorUtils.compositeColors(layerFg, layerBg); - } - - mBottomSheetBackgroundColorLegacy = AppDrawerStyle.getThemedBackgroundColor(getContext()); - updateBackgroundVisibility(mActivityContext.getDeviceProfile()); mSearchUiManager.initializeSearch(this); updateOneUiPageIndicatorState(); @@ -993,27 +983,7 @@ private int getScrimColor() { } int getBottomSheetBackgroundColor() { - int bgColor; - boolean preserveSurfaceAlpha = false; - if (LauncherPrefs.APP_DRAWER_CUSTOM_COLOR_ENABLED.get(mContext)) { - bgColor = AppDrawerStyle.getBackgroundColor(mContext); - } else { - if (!Flags.allAppsBlur()) { - bgColor = mBottomSheetBackgroundColorLegacy; - } else if (!mActivityContext.isAllAppsBackgroundBlurEnabled()) { - // Don't apply any alpha if the blur is disabled. - bgColor = AppDrawerStyle.getThemedBackgroundColor(mContext); - } else { - bgColor = mBottomSheetBackgroundColorOverBlur; - preserveSurfaceAlpha = true; - } - } - int opacity = LauncherPrefs.APP_DRAWER_OPACITY.get(mContext); - int alpha = preserveSurfaceAlpha - ? Math.round(Color.alpha(bgColor) * opacity / 100f) - : opacity * 255 / 100; - return ColorUtils.setAlphaComponent( - bgColor, alpha); + return getScrimColor(); } boolean isBackgroundBlurEnabled() { From 469f2c3923ab25deee35190b0fc633a43d15e79b Mon Sep 17 00:00:00 2001 From: pbzin Date: Fri, 28 Aug 2026 11:09:32 -0300 Subject: [PATCH 2/3] Launcher3: Match hotseat background to wallpaper --- res/values/cr_colors.xml | 2 ++ src/com/android/launcher3/Launcher.java | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/res/values/cr_colors.xml b/res/values/cr_colors.xml index 1abca2221d..431d2ad210 100644 --- a/res/values/cr_colors.xml +++ b/res/values/cr_colors.xml @@ -18,6 +18,8 @@ @*android:color/system_neutral2_50 + @*android:color/system_neutral2_50 + @*android:color/system_neutral2_900 #ffd3e3fd diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 6c551dbb8e..46ca3284bf 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -126,6 +126,7 @@ import android.graphics.Color; import android.graphics.Rect; import android.graphics.RectF; +import android.graphics.drawable.GradientDrawable; import android.os.Build; import android.os.Bundle; import android.os.Parcelable; @@ -1320,8 +1321,14 @@ protected void setupViews() { mWorkspace.getCurrentPage() - 1)); if (LauncherPrefs.SHOW_HOTSEAT_BG.get(this)) { - mHotseat.setBackgroundResource(R.drawable.bkg_appseat); - mHotseat.getBackground().setAlpha(LauncherPrefs.HOTSEAT_OPACITY.get(this) * 255 / 100); + GradientDrawable hotseatBackground = + (GradientDrawable) getDrawable(R.drawable.bkg_appseat).mutate(); + int hotseatColor = Themes.getAttrBoolean(this, R.attr.isWorkspaceDarkText) + ? R.color.appseat_color_light_wallpaper + : R.color.appseat_color_dark_wallpaper; + hotseatBackground.setColor(getColor(hotseatColor)); + hotseatBackground.setAlpha(LauncherPrefs.HOTSEAT_OPACITY.get(this) * 255 / 100); + mHotseat.setBackground(hotseatBackground); } // Setup the drag layer From 2ae90fd1524505d724064f7035f7d7b4c44f4673 Mon Sep 17 00:00:00 2001 From: pbzin Date: Fri, 28 Aug 2026 21:59:51 -0300 Subject: [PATCH 3/3] Launcher3: Split hotseat opacity by system theme --- res/values/cr_strings.xml | 2 ++ res/xml/launcher_home_screen_preferences.xml | 12 +++++++++++- src/com/android/launcher3/Launcher.java | 5 ++++- src/com/android/launcher3/LauncherPrefs.kt | 1 + .../launcher3/settings/SettingsHomescreen.java | 1 + 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/res/values/cr_strings.xml b/res/values/cr_strings.xml index abb4a1f293..488a4ff9c7 100644 --- a/res/values/cr_strings.xml +++ b/res/values/cr_strings.xml @@ -117,6 +117,8 @@ Hotseat background Add translucent background to the app dock + Background opacity in light theme + Background opacity in dark theme Background opacity diff --git a/res/xml/launcher_home_screen_preferences.xml b/res/xml/launcher_home_screen_preferences.xml index 519fc8eb03..286236919b 100644 --- a/res/xml/launcher_home_screen_preferences.xml +++ b/res/xml/launcher_home_screen_preferences.xml @@ -319,9 +319,19 @@ android:defaultValue="false" launcher:iconSpaceReserved="false" /> + +