Commit 625f4a72 authored by Robert Ogden's avatar Robert Ogden Committed by Commit Bot

Bug fix Previews Omnibox Badge Colors

Looks like I missed two things in implementation:
* The preview security icon should be Modern Blue 600
* I switched the two colors, making Blue 300 primary instead of Blue 600

Bug: 871839
Change-Id: I3fe0ebaf0fb230a491bcae891ef3f29b4286c00b
Reviewed-on: https://chromium-review.googlesource.com/c/1265021Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597253}
parent 56b9d6b0
......@@ -142,8 +142,7 @@
<color name="locationbar_light_selection_color">#CC5595FE</color>
<color name="locationbar_status_offline_color">@color/modern_grey_900</color>
<color name="locationbar_status_offline_color_light">@android:color/white</color>
<color name="locationbar_status_preview_color">@color/modern_blue_300</color>
<color name="locationbar_status_preview_color_light">@color/modern_blue_600</color>
<color name="locationbar_status_preview_color">@color/modern_blue_600</color>
<color name="locationbar_status_separator_color">@color/black_alpha_24</color>
<color name="locationbar_status_separator_color_light">#3DFFFFFF</color>
<color name="omnibox_focused_fading_background_color">@color/black_alpha_65</color>
......
......@@ -110,9 +110,9 @@ public interface ToolbarDataProvider {
@ColorRes
default int getVerboseStatusTextColor(Resources res, boolean useDarkColors) {
if (isPreview()) {
return ApiCompatibilityUtils.getColor(res,
useDarkColors ? R.color.locationbar_status_preview_color
: R.color.locationbar_status_preview_color_light);
// There will never be a Preview in Incognito and the site theme color is not used. So
// ignore useDarkColors.
return ApiCompatibilityUtils.getColor(res, R.color.locationbar_status_preview_color);
}
if (isOfflinePage()) {
......
......@@ -397,6 +397,11 @@ public class ToolbarModel implements ToolbarDataProvider {
if (isIncognito() || needLightIcon) {
// For a dark theme color, use light icons.
list = AppCompatResources.getColorStateList(mContext, R.color.light_mode_tint);
} else if (isPreview()) {
// There will never be a preview in incognito. Always use the darker color rather than
// incorporating with the block above.
list = AppCompatResources.getColorStateList(
mContext, R.color.locationbar_status_preview_color);
} else if (!hasTab() || isUsingBrandColor()
|| ChromeFeatureList.isEnabled(
ChromeFeatureList.OMNIBOX_HIDE_SCHEME_IN_STEADY_STATE)
......
Markdown is supported
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