For #24080 - Use layer accent non opaque for the tabs tray and history selected background color

upstream-sync
Gabriel Luong 2 years ago committed by mergify[bot]
parent 56022546f2
commit 50a7a8499c

@ -32,7 +32,7 @@ class TabHistoryViewHolder(
if (item.isSelected) {
view.setBackgroundColor(
view.context.getColorFromAttr(R.attr.tabHistoryItemSelectedBackground)
view.context.getColorFromAttr(R.attr.layerNonOpaque)
)
} else {
view.background = null

@ -16,9 +16,9 @@ import mozilla.components.concept.base.images.ImageLoader
import org.mozilla.fenix.R
import org.mozilla.fenix.databinding.TabTrayGridItemBinding
import org.mozilla.fenix.ext.increaseTapArea
import kotlin.math.max
import org.mozilla.fenix.selection.SelectionHolder
import org.mozilla.fenix.tabstray.TabsTrayStore
import kotlin.math.max
sealed class BrowserTabViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
/**
@ -102,7 +102,7 @@ sealed class BrowserTabViewHolder(itemView: View) : RecyclerView.ViewHolder(item
override fun updateSelectedTabIndicator(showAsSelected: Boolean) {
val color = if (showAsSelected) {
R.color.tab_tray_item_selected_background_normal_theme
R.color.fx_mobile_layer_color_accent_nonopaque
} else {
R.color.tab_tray_item_background_normal_theme
}

@ -140,13 +140,9 @@
<!-- Tab tray -->
<color name="tab_tray_item_background_normal_theme">@color/photonDarkGrey80</color>
<color name="tab_tray_item_selected_background_normal_theme">@color/tab_tray_item_selected_background_dark_theme</color>
<color name="tab_tray_item_thumbnail_background_normal_theme">@color/photonDarkGrey50</color>
<color name="tab_tray_item_thumbnail_icon_normal_theme">@color/photonDarkGrey05</color>
<!-- Tab History -->
<color name="tab_history_item_selected_background_normal_theme">@color/tab_tray_item_selected_background_dark_theme</color>
<!-- Reader View colors -->
<color name="mozac_feature_readerview_text_color">@color/fx_mobile_text_color_primary</color>

@ -8,6 +8,8 @@
<!-- Layers -->
<!-- Search -->
<attr name="layer3" format="reference" />
<!-- Selected tab -->
<attr name="layerNonOpaque" format="reference" />
<attr name="scrim" format="reference" />
<!-- Action -->
@ -76,9 +78,6 @@
<attr name="tabTrayThumbnailItemBackground" format="reference" />
<attr name="tabTrayThumbnailIcon" format="reference" />
<!-- Tab History -->
<attr name="tabHistoryItemSelectedBackground" format="reference" />
<declare-styleable name="TrackingProtectionCategory">
<attr name="categoryItemTitle" format="reference" />
<attr name="categoryItemDescription" format="reference" />

@ -138,7 +138,7 @@
<!-- App Bar Top (edit), Text Cursor, Selected Tab Check -->
<color name="fx_mobile_private_layer_color_accent" tools:ignore="UnusedResources">@color/photonViolet40</color>
<!-- Selected tab -->
<color name="fx_mobile_private_layer_color_accent_nonopaque" tools:ignore="UnusedResources">@color/photonViolet50A32</color>
<color name="fx_mobile_private_layer_color_accent_nonopaque">@color/photonViolet50A32</color>
<color name="fx_mobile_private_layer_color_scrim">@color/photonDarkGrey90A95</color>
<!-- Tooltip -->
<color name="fx_mobile_private_layer_color_gradient_start" tools:ignore="UnusedResources">@color/photonViolet70</color>
@ -248,9 +248,6 @@
<color name="dark_grey_90_gradient_start">@color/photonDarkGrey90</color>
<color name="dark_grey_90_gradient_end">#0015141A</color>
<!-- Tab Tray -->
<color name="tab_tray_item_selected_background_dark_theme">#412E69</color>
<!-- Private theme color palette -->
<color name="accent_private_theme">@color/photonViolet50</color>
<color name="accent_high_contrast_private_theme">#AA71FF</color>
@ -280,13 +277,9 @@
<!-- Tab tray -->
<color name="tab_tray_item_background_normal_theme">@color/photonLightGrey10</color>
<color name="tab_tray_item_selected_background_normal_theme">#E5DFF4</color>
<color name="tab_tray_item_thumbnail_background_normal_theme">@color/photonLightGrey10</color>
<color name="tab_tray_item_thumbnail_icon_normal_theme">@color/photonLightGrey60</color>
<!-- Tab History -->
<color name="tab_history_item_selected_background_normal_theme">@color/tab_tray_item_selected_background_normal_theme</color>
<!-- Bookmark buttons -->
<color name="bookmark_favicon_background">#DFDFE3</color>

@ -36,6 +36,8 @@
<!-- Layers -->
<!-- Search -->
<item name="layer3">@color/fx_mobile_layer_color_3</item>
<!-- Selected tab -->
<item name="layerNonOpaque">@color/fx_mobile_layer_color_accent_nonopaque</item>
<item name="scrim">@color/fx_mobile_layer_color_scrim</item>
<!-- Action -->
@ -109,9 +111,6 @@
<item name="tabTrayThumbnailItemBackground">@color/tab_tray_item_thumbnail_background_normal_theme</item>
<item name="tabTrayThumbnailIcon">@color/tab_tray_item_thumbnail_icon_normal_theme</item>
<!-- Tab History -->
<item name="tabHistoryItemSelectedBackground">@color/tab_history_item_selected_background_normal_theme</item>
<!-- Drawables -->
<item name="fenixLogo">@drawable/ic_logo_wordmark_normal</item>
<item name="homeBackground">@color/fx_mobile_layer_color_1</item>
@ -229,6 +228,8 @@
<!-- Layers -->
<!-- Search -->
<item name="layer3">@color/fx_mobile_private_layer_color_3</item>
<!-- Selected tab -->
<item name="layerNonOpaque">@color/fx_mobile_private_layer_color_accent_nonopaque</item>
<item name="scrim">@color/fx_mobile_private_layer_color_scrim</item>
<!-- Action -->
@ -301,9 +302,6 @@
<item name="tabTrayThumbnailItemBackground">@color/tab_tray_item_thumbnail_background_normal_theme</item>
<item name="tabTrayThumbnailIcon">@color/tab_tray_item_thumbnail_icon_normal_theme</item>
<!-- Tab History -->
<item name="tabHistoryItemSelectedBackground">@color/tab_tray_item_selected_background_dark_theme</item>
<!-- Drawables -->
<item name="fenixLogo">@drawable/ic_logo_wordmark_private</item>
<item name="homeBackground">@drawable/private_home_background_gradient</item>

Loading…
Cancel
Save