For #23888 - Replace @color/white_color with @color/fx_mobile_[icon|text]_color_oncolor

@color/white_color and @color/fx_mobile_[icon|text]_color_oncolor are equivalent
upstream-sync
Gabriel Luong 2 years ago committed by mergify[bot]
parent f14850bb48
commit d71e31188f

@ -19,7 +19,10 @@ import kotlin.math.abs
fun TabCollection.getIconColor(context: Context): Int {
val iconColors = context.resources.obtainTypedArray(R.array.collection_icon_colors)
val index = abs(id % iconColors.length()).toInt()
val color = iconColors.getColor(index, ContextCompat.getColor(context, R.color.white_color))
val color = iconColors.getColor(
index,
ContextCompat.getColor(context, R.color.fx_mobile_icon_color_oncolor)
)
iconColors.recycle()
return color
}

@ -34,7 +34,10 @@ open class LibraryPageView(
) {
updateToolbar(
title = title,
foregroundColor = ContextCompat.getColor(context, R.color.white_color),
foregroundColor = ContextCompat.getColor(
context,
R.color.fx_mobile_text_color_oncolor_primary
),
backgroundColor = context.getColorFromAttr(R.attr.accent)
)
}

@ -86,7 +86,12 @@ class MigrationProgressActivity : AbstractMigrationProgressActivity() {
}
binding.migrationButtonTextView.apply {
text = getString(R.string.migration_update_app_button, getString(R.string.app_name))
setTextColor(ContextCompat.getColor(context, R.color.white_color))
setTextColor(
ContextCompat.getColor(
context,
R.color.fx_mobile_text_color_oncolor_primary
)
)
}
binding.migrationButton.setBackgroundResource(R.drawable.migration_button_background)
binding.migrationButtonProgressBar.visibility = View.INVISIBLE

@ -6,7 +6,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white_color">
android:background="@color/photonLightGrey05">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"

@ -31,7 +31,7 @@
android:layout_marginEnd="32dp"
android:lineSpacingExtra="2dp"
android:text="@string/cfr_message"
android:textColor="@color/photonLightGrey05"
android:textColor="@color/fx_mobile_text_color_oncolor_primary"
android:textSize="16sp"
app:fontFamily="@font/metropolis_medium"
app:layout_constraintBottom_toTopOf="@id/cfr_pos_button"
@ -65,7 +65,7 @@
android:background="@android:color/transparent"
android:text="@string/cfr_neg_button_text"
android:textAllCaps="false"
android:textColor="@color/white_color"
android:textColor="@color/fx_mobile_text_color_oncolor_primary"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

@ -7,7 +7,7 @@
<item
android:id="@+id/share_bookmark_multi_select"
android:icon="@drawable/ic_share"
app:iconTint="@color/white_color"
app:iconTint="@color/fx_mobile_icon_color_oncolor"
android:title="@string/browser_menu_share"
app:showAsAction="ifRoom" />
<item

@ -7,7 +7,7 @@
<item
android:id="@+id/delete_bookmarks_multi_select"
android:icon="@drawable/mozac_ic_delete"
app:iconTint="@color/white_color"
app:iconTint="@color/fx_mobile_icon_color_oncolor"
android:title="@string/bookmark_menu_delete_button"
app:showAsAction="ifRoom" />
</menu>

@ -3,23 +3,23 @@
- 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/. -->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/share_history_multi_select"
android:icon="@drawable/ic_share"
app:iconTint="@color/white_color"
android:title="@string/browser_menu_share"
app:showAsAction="ifRoom" />
android:id="@+id/share_history_multi_select"
android:icon="@drawable/ic_share"
app:iconTint="@color/fx_mobile_icon_color_oncolor"
android:title="@string/browser_menu_share"
app:showAsAction="ifRoom" />
<item
android:id="@+id/open_history_in_new_tabs_multi_select"
android:title="@string/bookmark_menu_open_in_new_tab_button"
app:showAsAction="never" />
android:id="@+id/open_history_in_new_tabs_multi_select"
android:title="@string/bookmark_menu_open_in_new_tab_button"
app:showAsAction="never" />
<item
android:id="@+id/open_history_in_private_tabs_multi_select"
android:title="@string/bookmark_menu_open_in_private_tab_button"
app:showAsAction="never" />
android:id="@+id/open_history_in_private_tabs_multi_select"
android:title="@string/bookmark_menu_open_in_private_tab_button"
app:showAsAction="never" />
<item
android:id="@+id/delete_history_multi_select"
android:title="@string/bookmark_menu_delete_button"
app:showAsAction="never" />
android:id="@+id/delete_history_multi_select"
android:title="@string/bookmark_menu_delete_button"
app:showAsAction="never" />
</menu>

@ -319,7 +319,6 @@
<!-- Misc colors applied universally-->
<color name="suggestion_highlight_color">#5C592ACB</color>
<color name="white_color">@color/photonLightGrey05</color>
<color name="text_scale_example_text_color">#232749</color>
<color name="sync_error_background_color">#FFF36E</color>
<color name="sync_error_text_color">@color/photonYellow90</color>

@ -28,7 +28,7 @@ class TabCollectionTest {
}
// Returns a color for negative IDs
val defaultColor = ContextCompat.getColor(testContext, R.color.white_color)
val defaultColor = ContextCompat.getColor(testContext, R.color.fx_mobile_icon_color_oncolor)
assertNotEquals(defaultColor, mockTabCollection(-123L).getIconColor(testContext))
}

Loading…
Cancel
Save