For #24252 - Rename contrastText attribute to textOnColorPrimary

upstream-sync
Gabriel Luong 2 years ago committed by mergify[bot]
parent e5d8f1e8d2
commit ad95f950bb

@ -218,7 +218,7 @@ class AddonsManagementFragment : Fragment(R.layout.fragment_add_ons_management)
requireContext()
),
positiveButtonTextColor = ThemeManager.resolveAttribute(
R.attr.contrastText,
R.attr.textOnColorPrimary,
requireContext()
),
positiveButtonRadius = (resources.getDimensionPixelSize(R.dimen.tab_corner_radius)).toFloat()
@ -253,7 +253,7 @@ class AddonsManagementFragment : Fragment(R.layout.fragment_add_ons_management)
requireContext()
),
confirmButtonTextColor = ThemeManager.resolveAttribute(
R.attr.contrastText,
R.attr.textOnColorPrimary,
requireContext()
),
confirmButtonRadius = (resources.getDimensionPixelSize(R.dimen.tab_corner_radius)).toFloat()

@ -486,7 +486,7 @@ abstract class BaseBrowserFragment :
context
),
positiveButtonTextColor = ThemeManager.resolveAttribute(
R.attr.contrastText,
R.attr.textOnColorPrimary,
context
),
positiveButtonRadius = (resources.getDimensionPixelSize(R.dimen.tab_corner_radius)).toFloat()

@ -711,7 +711,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
binding.searchEnginesShortcutButton.isVisible = areShortcutsAvailable
binding.searchEnginesShortcutButton.isChecked = showShortcuts
val color = if (showShortcuts) R.attr.contrastText else R.attr.textPrimary
val color = if (showShortcuts) R.attr.textOnColorPrimary else R.attr.textPrimary
binding.searchEnginesShortcutButton.compoundDrawables[0]?.setTint(
requireContext().getColorFromAttr(color)
)

@ -424,7 +424,7 @@ class TabsTrayFragment : AppCompatDialogFragment() {
requireContext()
),
positiveButtonTextColor = ThemeManager.resolveAttribute(
R.attr.contrastText,
R.attr.textOnColorPrimary,
requireContext()
),
positiveButtonRadius = (resources.getDimensionPixelSize(R.dimen.tab_corner_radius)).toFloat()

@ -3,7 +3,7 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?contrastText" android:state_checked="true" />
<item android:color="?attr/textOnColorPrimary" android:state_checked="true" />
<!-- Default State -->
<item android:color="?attr/textPrimary" />
</selector>

@ -31,6 +31,8 @@
<attr name="textWarning" format="reference"/>
<!-- Small heading, Text link -->
<attr name="textAccent" format="reference" />
<!-- Text Inverted/On Color -->
<attr name="textOnColorPrimary" format="reference" />
<!-- Action Primary text -->
<attr name="textActionPrimary" format="reference" />
@ -47,7 +49,6 @@
<attr name="borderPrimary" format="reference" />
<!-- Color palette attributes -->
<attr name="contrastText" format="reference" />
<attr name="accent" format="reference" />
<attr name="accentBright" format="reference" />
<attr name="accentHighContrast" format="reference" />

@ -195,7 +195,7 @@
<!-- Small heading, Text link -->
<color name="fx_mobile_private_text_color_accent_disabled" tools:ignore="UnusedResources">@color/photonViolet20A60</color>
<!-- Text Inverted/On Color -->
<color name="fx_mobile_private_text_color_oncolor_primary" tools:ignore="UnusedResources">@color/photonLightGrey05</color>
<color name="fx_mobile_private_text_color_oncolor_primary">@color/photonLightGrey05</color>
<!-- Text Inverted/On Color -->
<color name="fx_mobile_private_text_color_oncolor_secondary" tools:ignore="UnusedResources">@color/photonLightGrey40</color>
<!-- Action Primary text -->

@ -59,6 +59,8 @@
<item name="textWarning">@color/fx_mobile_text_color_warning</item>
<!-- Small heading, Text link -->
<item name="textAccent">@color/fx_mobile_text_color_accent</item>
<!-- Text Inverted/On Color -->
<item name="textOnColorPrimary">@color/fx_mobile_text_color_oncolor_primary</item>
<!-- Action Primary text -->
<item name="textActionPrimary">@color/fx_mobile_text_color_action_primary</item>
@ -84,7 +86,6 @@
<item name="colorControlNormal">@color/fx_mobile_text_color_primary</item>
<!-- Updated color attributes -->
<item name="contrastText">@color/fx_mobile_text_color_oncolor_primary</item>
<item name="accent">@color/accent_normal_theme</item>
<item name="accentBright">@color/photonViolet70</item>
<item name="accentHighContrast">@color/accent_high_contrast_normal_theme</item>
@ -255,6 +256,8 @@
<item name="textWarning">@color/fx_mobile_private_text_color_warning</item>
<!-- Small heading, Text link -->
<item name="textAccent">@color/fx_mobile_private_text_color_accent</item>
<!-- Text Inverted/On Color -->
<item name="textOnColorPrimary">@color/fx_mobile_private_text_color_oncolor_primary</item>
<!-- Action Primary text -->
<item name="textActionPrimary">@color/fx_mobile_private_text_color_action_primary</item>
@ -278,7 +281,6 @@
<item name="colorControlNormal">@color/fx_mobile_private_text_color_primary</item>
<!-- Updated color attributes -->
<item name="contrastText">@color/fx_mobile_private_text_color_primary</item>
<item name="accent">@color/accent_private_theme</item>
<item name="accentBright">@color/photonViolet70</item>
<item name="accentHighContrast">@color/accent_high_contrast_private_theme</item>

Loading…
Cancel
Save