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

Commit fb1b38d7 authored by Santiago Etchebehere's avatar Santiago Etchebehere Committed by android-build-merger
Browse files

Merge "Update the color of the custom shape options" into ub-launcher3-qt-r1-dev

am: 752cc8ad

Change-Id: I13c707ce7684a962bf2cb70e32b3a94bdde25b03
parents 9d717366 752cc8ad
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -23,5 +23,6 @@
        android:alpha="0.24"
        android:color="?android:colorAccent" />
    <item
        android:color="@color/material_grey500"/>
        android:alpha="0.05"
        android:color="@color/option_border_default"/>
</selector>
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
    <color name="tile_disabled_icon_color">@color/light_grey</color>
    <color name="tile_disabled_background_color">#353535</color>

    <color name="shape_option_tile_foreground_color">@color/edit_background_base</color>

    <color name="tip_dot_color">#81C995</color>
    <color name="tip_dot_line_color">#000000</color>

+3 −1
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@
    <color name="shape_thumbnail_color">#b2b2b2</color>
    <color name="icon_thumbnail_color">@color/black_87_alpha</color>

    <color name="option_border_default">@color/edit_background_base</color>

    <color name="clockface_preview_background">@android:color/black</color>

    <color name="theme_preview_icon_color">@color/google_grey700</color>
@@ -47,7 +49,7 @@
    <color name="tile_disabled_icon_color">#2d2d2d</color>
    <color name="tile_disabled_background_color">@color/light_grey</color>

    <color name="shape_option_tile_foreground_color">#f8f9fa</color>
    <color name="shape_option_tile_foreground_color">@color/edit_background_base</color>

    <color name="tip_dot_color">#34A853</color>
    <color name="tip_dot_line_color">#FFFFFF</color>
+9 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.Resources.Theme;
import android.content.res.TypedArray;
import android.graphics.Path;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
@@ -49,6 +50,7 @@ import androidx.annotation.Dimension;
import androidx.annotation.DrawableRes;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.core.graphics.ColorUtils;

import com.android.customization.model.CustomizationManager;
import com.android.customization.model.CustomizationOption;
@@ -443,7 +445,13 @@ public abstract class ThemeComponentOption implements CustomizationOption<ThemeC

            foreground.setIntrinsicHeight(background.getIntrinsicHeight() - borderWidth);
            foreground.setIntrinsicWidth(background.getIntrinsicWidth() - borderWidth);
            foreground.setTint(res.getColor(R.color.shape_option_tile_foreground_color, theme));
            TypedArray ta = view.getContext().obtainStyledAttributes(
                    new int[]{android.R.attr.colorPrimary});
            int primaryColor = ta.getColor(0, 0);
            ta.recycle();
            int foregroundColor = res.getColor(R.color.shape_option_tile_foreground_color, theme);

            foreground.setTint(ColorUtils.blendARGB(primaryColor, foregroundColor, .05f));

            thumb.setImageDrawable(mShape);
            view.setContentDescription(mLabel);