Commit efefb20b authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

[Modern] Transition to default theme color when focusing omnibox

BUG=803098

Change-Id: I18537d5a844368a694bbb292a98a94da735c6bfb
Reviewed-on: https://chromium-review.googlesource.com/900100
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534851}
parent 67827ab7
...@@ -1112,6 +1112,19 @@ public class ToolbarPhone extends ToolbarLayout ...@@ -1112,6 +1112,19 @@ public class ToolbarPhone extends ToolbarLayout
isLocationBarRtl, locationBarBaseTranslationX)); isLocationBarRtl, locationBarBaseTranslationX));
mLocationBar.setUrlFocusChangePercent(mUrlExpansionPercent); mLocationBar.setUrlFocusChangePercent(mUrlExpansionPercent);
if (mLocationBar.useModernDesign()) {
int defaultColor = ColorUtils.getDefaultThemeColor(getResources(), true, isIncognito());
int defaultLocationBarColor = getLocationBarColorForToolbarColor(defaultColor);
int primaryColor = getToolbarDataProvider().getPrimaryColor();
int themedLocationBarColor = getLocationBarColorForToolbarColor(primaryColor);
updateToolbarBackground(ColorUtils.getColorWithOverlay(
primaryColor, defaultColor, mUrlFocusChangePercent));
updateModernLocationBarColor(ColorUtils.getColorWithOverlay(
themedLocationBarColor, defaultLocationBarColor, mUrlFocusChangePercent));
}
// Force an invalidation of the location bar to properly handle the clipping of the URL // Force an invalidation of the location bar to properly handle the clipping of the URL
// bar text as a result of the URL action container translations. // bar text as a result of the URL action container translations.
mLocationBar.invalidate(); mLocationBar.invalidate();
......
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