Commit e90c1748 authored by Brandon Wylie's avatar Brandon Wylie Committed by Commit Bot

Fix dark mode widget delete button icon color

The ColorStateList needs to be different between the mic button and the
delete button.

Bug: 1054300
Change-Id: I97e88144c359e5c27cecfd7b99509051520a7808
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2067461
Commit-Queue: Brandon Wylie <wylieb@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#744123}
parent 61539596
......@@ -1102,15 +1102,18 @@ public class LocationBarLayout extends FrameLayout
// This will be called between inflation and initialization. For those calls, using a null
// ColorStateList should have no visible impact to the user.
ColorStateList colorStateList = mAssistantVoiceSearchService == null
ColorStateList micColorStateList = mAssistantVoiceSearchService == null
? null
: mAssistantVoiceSearchService.getMicButtonColorStateList(
primaryColor, getContext());
ApiCompatibilityUtils.setImageTintList(mMicButton, colorStateList);
ApiCompatibilityUtils.setImageTintList(mDeleteButton, colorStateList);
ApiCompatibilityUtils.setImageTintList(mMicButton, micColorStateList);
final boolean useDarkColors =
!ColorUtils.shouldUseLightForegroundOnBackground(primaryColor);
ColorStateList colorStateList =
ChromeColors.getPrimaryIconTint(getContext(), !useDarkColors);
ApiCompatibilityUtils.setImageTintList(mDeleteButton, colorStateList);
// If the URL changed colors and is not focused, update the URL to account for the new
// color scheme.
if (mUrlCoordinator.setUseDarkTextColors(useDarkColors) && !mUrlBar.hasFocus()) {
......
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