Commit f63cb4e0 authored by ValentinTimisica's avatar ValentinTimisica Committed by Emily Kager
Browse files

For #10244: Creates drawable for add-ons private browsing label.

The drawable is sent to AddonsManagerAdapter.Style constructor and is displayed
near the add-on name if it is allowed to run in private browsing
parent a0188106
...@@ -130,7 +130,8 @@ class AddonsManagementFragment : Fragment(R.layout.fragment_add_ons_management), ...@@ -130,7 +130,8 @@ class AddonsManagementFragment : Fragment(R.layout.fragment_add_ons_management),
addonNameTextColor = ThemeManager.resolveAttribute(R.attr.primaryText, context), addonNameTextColor = ThemeManager.resolveAttribute(R.attr.primaryText, context),
addonSummaryTextColor = ThemeManager.resolveAttribute(R.attr.secondaryText, context), addonSummaryTextColor = ThemeManager.resolveAttribute(R.attr.secondaryText, context),
sectionsTypeFace = ResourcesCompat.getFont(context, R.font.metropolis_semibold), sectionsTypeFace = ResourcesCompat.getFont(context, R.font.metropolis_semibold),
addonBackgroundIconColor = ThemeManager.resolveAttribute(R.attr.inset, requireContext()) addonBackgroundIconColor = ThemeManager.resolveAttribute(R.attr.inset, requireContext()),
addonAllowPrivateBrowsingLabelDrawableRes = R.drawable.ic_add_on_private_browsing_label
) )
} }
......
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:pathData="m8,16c-4.4,0 -8,-3.6 -8,-8 0,-4.4 3.6,-8 8,-8 4.4,0 8,3.6 8,8 0,4.4 -3.6,8 -8,8z"
android:fillColor="?addOnPrivateBrowsingExteriorCircleBackground"/>
<path
android:pathData="m10.2667,7.3333c-0.6667,-0.0667 -1.2667,0.3333 -1.4,1 0,0.2 0.8,0.4667 1.5333,0.4667 0.7333,0 1.4,-0.4667 1.4,-0.6s-0.4667,-0.8 -1.5333,-0.8667zM5.7333,7.3333c-1.0667,0.0667 -1.5333,0.6667 -1.5333,0.8667 0,0.1333 0.7333,0.6 1.4,0.6s1.5333,-0.2667 1.5333,-0.4667c-0.1333,-0.6667 -0.8,-1.0667 -1.4,-1zM10.9333,11c-1.1333,0 -1.8667,-1.3333 -2.9333,-1.3333s-1.8667,1.3333 -2.9333,1.3333c-1.4,0 -2.4,-1.2667 -2.4,-3.5333 0,-1.4 0.4,-1.8 2.2,-1.8s2.2667,0.7333 3.1333,0.7333 1.4,-0.7333 3.1333,-0.7333c1.7333,0 2.2,0.4667 2.2,1.8 0,2.2667 -1,3.5333 -2.4,3.5333z"
android:fillColor="?addOnPrivateBrowsingInteriorIconBackground"/>
</vector>
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
<color name="onboarding_finish_button_text_normal_theme">@color/primary_text_dark_theme</color> <color name="onboarding_finish_button_text_normal_theme">@color/primary_text_dark_theme</color>
<color name="onboarding_illustration_selected_normal_theme">@color/onboarding_illustration_selected_dark_theme</color> <color name="onboarding_illustration_selected_normal_theme">@color/onboarding_illustration_selected_dark_theme</color>
<color name="onboarding_illustration_deselected_normal_theme">@color/onboarding_illustration_deselected_dark_theme</color> <color name="onboarding_illustration_deselected_normal_theme">@color/onboarding_illustration_deselected_dark_theme</color>
<color name="add_on_private_browsing_exterior_circle_background_normal_theme">@color/add_on_private_browsing_exterior_circle_background_dark_theme</color>
<color name="add_on_private_browsing_interior_icon_background_normal_theme">@color/add_on_private_browsing_interior_icon_background_dark_theme</color>
<!-- Tab tray --> <!-- Tab tray -->
<color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_dark_theme</color> <color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_dark_theme</color>
......
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
<attr name="onboardingDarkGradientEndBackground" format="reference" /> <attr name="onboardingDarkGradientEndBackground" format="reference" />
<attr name="onboardingSelected" format="reference"/> <attr name="onboardingSelected" format="reference"/>
<attr name="onboardingDeselected" format="reference"/> <attr name="onboardingDeselected" format="reference"/>
<attr name="addOnPrivateBrowsingExteriorCircleBackground" format="reference"/>
<attr name="addOnPrivateBrowsingInteriorIconBackground" format="reference"/>
<!-- Tab tray --> <!-- Tab tray -->
<attr name="tabTrayItemText" format="reference"/> <attr name="tabTrayItemText" format="reference"/>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<color name="light_grey_60">#AFAFBB</color> <color name="light_grey_60">#AFAFBB</color>
<color name="violet_50_32a">#529059FF</color> <color name="violet_50_32a">#529059FF</color>
<color name="violet_70_12a">#1F592ACB</color> <color name="violet_70_12a">#1F592ACB</color>
<!-- Light theme color palette --> <!-- Light theme color palette -->
<color name="primary_text_light_theme">#20123A</color> <color name="primary_text_light_theme">#20123A</color>
<color name="secondary_text_light_theme">@color/photonGrey50</color> <color name="secondary_text_light_theme">@color/photonGrey50</color>
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
<color name="onboarding_card_finish_button_light_theme">@color/accent_light_theme</color> <color name="onboarding_card_finish_button_light_theme">@color/accent_light_theme</color>
<color name="onboarding_illustration_selected_light_theme">@color/accent_bright_light_theme</color> <color name="onboarding_illustration_selected_light_theme">@color/accent_bright_light_theme</color>
<color name="onboarding_illustration_deselected_light_theme">#9915141A</color> <color name="onboarding_illustration_deselected_light_theme">#9915141A</color>
<color name="add_on_private_browsing_exterior_circle_background_light_theme">@color/accent_bright_light_theme</color>
<color name="add_on_private_browsing_interior_icon_background_light_theme">#FFFFFF</color>
<!-- Tab Tray --> <!-- Tab Tray -->
<color name="tab_tray_item_text_light_theme">@color/ink_80</color> <color name="tab_tray_item_text_light_theme">@color/ink_80</color>
...@@ -103,6 +105,8 @@ ...@@ -103,6 +105,8 @@
<color name="onboarding_card_finish_button_dark_theme">@color/accent_high_contrast_dark_theme</color> <color name="onboarding_card_finish_button_dark_theme">@color/accent_high_contrast_dark_theme</color>
<color name="onboarding_illustration_selected_dark_theme">@color/accent_dark_theme</color> <color name="onboarding_illustration_selected_dark_theme">@color/accent_dark_theme</color>
<color name="onboarding_illustration_deselected_dark_theme">#99FBFBFE</color> <color name="onboarding_illustration_deselected_dark_theme">#99FBFBFE</color>
<color name="add_on_private_browsing_exterior_circle_background_dark_theme">@color/accent_dark_theme</color>
<color name="add_on_private_browsing_interior_icon_background_dark_theme">#FFFFFF</color>
<!-- Tab Tray --> <!-- Tab Tray -->
<color name="tab_tray_item_text_dark_theme">@color/light_grey_05</color> <color name="tab_tray_item_text_dark_theme">@color/light_grey_05</color>
...@@ -149,6 +153,8 @@ ...@@ -149,6 +153,8 @@
<color name="onboarding_finish_button_text_private_theme">@color/accent_light_theme</color> <color name="onboarding_finish_button_text_private_theme">@color/accent_light_theme</color>
<color name="onboarding_illustration_selected_private_theme">@color/accent_private_theme</color> <color name="onboarding_illustration_selected_private_theme">@color/accent_private_theme</color>
<color name="onboarding_illustration_deselected_private_theme">@color/onboarding_illustration_deselected_dark_theme</color> <color name="onboarding_illustration_deselected_private_theme">@color/onboarding_illustration_deselected_dark_theme</color>
<color name="add_on_private_browsing_exterior_circle_background_private_theme">@color/accent_private_theme</color>
<color name="add_on_private_browsing_interior_icon_background_private_theme">#FFFFFF</color>
<!-- Tab Tray --> <!-- Tab Tray -->
<color name="tab_tray_item_text_private_theme">@color/light_grey_05</color> <color name="tab_tray_item_text_private_theme">@color/light_grey_05</color>
...@@ -194,6 +200,8 @@ ...@@ -194,6 +200,8 @@
<color name="onboarding_finish_button_text_normal_theme">@color/primary_text_dark_theme</color> <color name="onboarding_finish_button_text_normal_theme">@color/primary_text_dark_theme</color>
<color name="onboarding_illustration_selected_normal_theme">@color/onboarding_illustration_selected_light_theme</color> <color name="onboarding_illustration_selected_normal_theme">@color/onboarding_illustration_selected_light_theme</color>
<color name="onboarding_illustration_deselected_normal_theme">@color/onboarding_illustration_deselected_light_theme</color> <color name="onboarding_illustration_deselected_normal_theme">@color/onboarding_illustration_deselected_light_theme</color>
<color name="add_on_private_browsing_exterior_circle_background_normal_theme">@color/add_on_private_browsing_exterior_circle_background_light_theme</color>
<color name="add_on_private_browsing_interior_icon_background_normal_theme">@color/add_on_private_browsing_interior_icon_background_light_theme</color>
<!-- Tab tray --> <!-- Tab tray -->
<color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_light_theme</color> <color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_light_theme</color>
......
...@@ -70,6 +70,8 @@ ...@@ -70,6 +70,8 @@
<item name="onboardingDarkGradientEndBackground">@color/onboarding_card_background_end_gradient_normal_theme</item> <item name="onboardingDarkGradientEndBackground">@color/onboarding_card_background_end_gradient_normal_theme</item>
<item name="onboardingSelected">@color/onboarding_illustration_selected_normal_theme</item> <item name="onboardingSelected">@color/onboarding_illustration_selected_normal_theme</item>
<item name="onboardingDeselected">@color/onboarding_illustration_deselected_normal_theme</item> <item name="onboardingDeselected">@color/onboarding_illustration_deselected_normal_theme</item>
<item name="addOnPrivateBrowsingExteriorCircleBackground">@color/add_on_private_browsing_exterior_circle_background_normal_theme</item>
<item name="addOnPrivateBrowsingInteriorIconBackground">@color/add_on_private_browsing_interior_icon_background_normal_theme</item>
<item name="tabTrayItemText">@color/tab_tray_item_text_normal_theme</item> <item name="tabTrayItemText">@color/tab_tray_item_text_normal_theme</item>
<item name="tabTrayItemUrl">@color/tab_tray_item_url_normal_theme</item> <item name="tabTrayItemUrl">@color/tab_tray_item_url_normal_theme</item>
...@@ -190,6 +192,8 @@ ...@@ -190,6 +192,8 @@
<item name="onboardingDarkGradientEndBackground">@color/onboarding_card_background_end_gradient_private_theme</item> <item name="onboardingDarkGradientEndBackground">@color/onboarding_card_background_end_gradient_private_theme</item>
<item name="onboardingSelected">@color/onboarding_illustration_selected_private_theme</item> <item name="onboardingSelected">@color/onboarding_illustration_selected_private_theme</item>
<item name="onboardingDeselected">@color/onboarding_illustration_deselected_private_theme</item> <item name="onboardingDeselected">@color/onboarding_illustration_deselected_private_theme</item>
<item name="addOnPrivateBrowsingExteriorCircleBackground">@color/add_on_private_browsing_exterior_circle_background_private_theme</item>
<item name="addOnPrivateBrowsingInteriorIconBackground">@color/add_on_private_browsing_interior_icon_background_private_theme</item>
<!-- Tab Tray --> <!-- Tab Tray -->
<item name="tabTrayItemText">@color/tab_tray_item_text_private_theme</item> <item name="tabTrayItemText">@color/tab_tray_item_text_private_theme</item>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment