For #23905 - Update onboarding icons to use Icon Active color

This commit is contained in:
Gabriel Luong 2022-02-22 21:49:36 -05:00 committed by mergify[bot]
parent 0f3c82c16b
commit 2f30442610
5 changed files with 11 additions and 5 deletions

View File

@ -16,7 +16,7 @@ import org.mozilla.fenix.ext.setBounds
* Sets the drawableStart of a header in an onboarding card.
*/
fun TextView.setOnboardingIcon(@DrawableRes id: Int) {
val icon = context.getDrawableWithTint(id, context.getColorFromAttr(R.attr.onboardingSelected))?.apply {
val icon = context.getDrawableWithTint(id, context.getColorFromAttr(R.attr.iconActive))?.apply {
val size = context.resources.getDimensionPixelSize(R.dimen.onboarding_header_icon_height_width)
setBounds(size)
}

View File

@ -8,12 +8,12 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?onboardingSelected"
android:fillColor="?iconActive"
android:pathData="M12 6.5a3 3 0 1 0 0 6 3 3 0 0 0 0-6z" />
<path
android:fillColor="?onboardingSelected"
android:fillColor="?iconActive"
android:pathData="M12 21.5c-5.238 0-9.5-4.262-9.5-9.5S6.762 2.5 12 2.5s9.5 4.262 9.5 9.5-4.262 9.5-9.5 9.5zM12 4c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8z" />
<path
android:fillColor="?onboardingSelected"
android:fillColor="?iconActive"
android:pathData="M8.314 14c-0.652 0-1.232 0.269-1.672 0.684A6.014 6.014 0 0 0 12 18a6.355 6.355 0 0 0 1.084-0.104c0.083-0.014 0.165-0.033 0.247-0.051a6.014 6.014 0 0 0 4.027-3.162A2.43 2.43 0 0 0 15.686 14H8.314z" />
</vector>

View File

@ -8,6 +8,8 @@
<attr name="layer3" format="reference" />
<!-- Small heading, Text link -->
<attr name="textAccent" format="reference" />
<!-- Active tab -->
<attr name="iconActive" format="reference" />
<!-- Color palette attributes -->
<attr name="primaryText" format="reference" />

View File

@ -209,7 +209,7 @@
<!-- Secondary icon -->
<color name="fx_mobile_private_icon_color_secondary" tools:ignore="UnusedResources">@color/photonLightGrey40</color>
<!-- Active tab -->
<color name="fx_mobile_private_icon_color_active" tools:ignore="UnusedResources">@color/photonViolet40</color>
<color name="fx_mobile_private_icon_color_active">@color/photonViolet40</color>
<!-- Disabled icon -->
<color name="fx_mobile_private_icon_color_disabled" tools:ignore="UnusedResources">@color/photonLightGrey05A40</color>
<!-- Icon inverted (on color) -->

View File

@ -36,6 +36,8 @@
<item name="layer3">@color/fx_mobile_layer_color_3</item>
<!-- Small heading, Text link -->
<item name="textAccent">@color/fx_mobile_text_color_accent</item>
<!-- Active tab -->
<item name="iconActive">@color/fx_mobile_icon_color_active</item>
<!-- Active thumb color & Active track color (30% transparency) -->
<item name="colorControlActivated">@color/accent_high_contrast_normal_theme</item>
@ -214,6 +216,8 @@
<item name="layer3">@color/fx_mobile_private_layer_color_3</item>
<!-- Small heading, Text link -->
<item name="textAccent">@color/fx_mobile_private_text_color_accent</item>
<!-- Active tab -->
<item name="iconActive">@color/fx_mobile_private_icon_color_active</item>
<!-- Inactive thumb color -->
<item name="colorSwitchThumbNormal">@color/toggle_off_knob_dark_theme</item>