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

Commit a6afdffb authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Adding support for dark text on dark theme

Bug: 80253867
Change-Id: Ib81a2fe884f68cd2dd4af1e573bd8c836f374f16
parent db28a992
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@

    <style name="LauncherTheme" parent="@style/BaseLauncherThemeWithCustomAttrs"></style>

    <style name="LauncherThemeDarkText" parent="@style/LauncherTheme">
    <style name="LauncherTheme.DarkText" parent="@style/LauncherTheme">
        <item name="workspaceTextColor">#FF212121</item>
        <item name="workspaceShadowColor">@android:color/transparent</item>
        <item name="workspaceAmbientShadowColor">@android:color/transparent</item>
@@ -70,6 +70,15 @@
        <item name="isMainColorDark">true</item>
    </style>

    <style name="LauncherThemeDark.DarKText" parent="@style/LauncherThemeDark">
        <item name="workspaceTextColor">#FF212121</item>
        <item name="workspaceShadowColor">@android:color/transparent</item>
        <item name="workspaceAmbientShadowColor">@android:color/transparent</item>
        <item name="workspaceKeyShadowColor">@android:color/transparent</item>
        <item name="isWorkspaceDarkText">true</item>
        <item name="workspaceStatusBarScrim">@null</item>
    </style>

    <!--
    Theme overrides to element on homescreen, i.e., which are drawn on top on wallpaper.
    Various foreground colors are overridden to be workspaceTextColor so that they are properly
+4 −4
Original line number Diff line number Diff line
@@ -90,11 +90,11 @@ public abstract class BaseDraggingActivity extends BaseActivity

    protected int getThemeRes(WallpaperColorInfo wallpaperColorInfo) {
        if (wallpaperColorInfo.isDark()) {
            return R.style.LauncherThemeDark;
        } else if (wallpaperColorInfo.supportsDarkText()) {
            return R.style.LauncherThemeDarkText;
            return wallpaperColorInfo.supportsDarkText() ?
                    R.style.LauncherThemeDark_DarKText : R.style.LauncherThemeDark;
        } else {
            return R.style.LauncherTheme;
            return wallpaperColorInfo.supportsDarkText() ?
                    R.style.LauncherTheme_DarkText : R.style.LauncherTheme;
        }
    }