Commit 98567213 authored by mdjones's avatar mdjones Committed by Commit bot

Fix incognito progressbar color on tablet

Dynamic inflation of the progress bar caused it's color to be
incorrect on incognito tabs. This change modifies the ToolbarTablet
to set the appropriate color whenever the tab's model changes.

BUG=698715

Review-Url: https://codereview.chromium.org/2742573006
Cr-Commit-Position: refs/heads/master@{#456201}
parent 2749492d
...@@ -333,8 +333,11 @@ public class ToolbarTablet extends ToolbarLayout implements OnClickListener { ...@@ -333,8 +333,11 @@ public class ToolbarTablet extends ToolbarLayout implements OnClickListener {
super.onTabOrModelChanged(); super.onTabOrModelChanged();
boolean incognito = isIncognito(); boolean incognito = isIncognito();
if (mUseLightColorAssets == null || mUseLightColorAssets != incognito) { if (mUseLightColorAssets == null || mUseLightColorAssets != incognito) {
setBackgroundResource(incognito int colorResource =
? R.color.incognito_primary_color : R.color.default_primary_color); incognito ? R.color.incognito_primary_color : R.color.default_primary_color;
setBackgroundResource(colorResource);
getProgressBar().setThemeColor(
ApiCompatibilityUtils.getColor(getResources(), colorResource), isIncognito());
mMenuButton.setTint(incognito ? mLightModeTint : mDarkModeTint); mMenuButton.setTint(incognito ? mLightModeTint : mDarkModeTint);
mHomeButton.setTint(incognito ? mLightModeTint : mDarkModeTint); mHomeButton.setTint(incognito ? mLightModeTint : mDarkModeTint);
......
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