Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: chrome/browser/themes/browser_theme_pack.cc

Issue 2044223006: Make toolbar color opaque in browser theme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile failure Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/themes/browser_theme_pack_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/browser_theme_pack.cc
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index 70e81a834842847ff7612a322891752d73e20f6c..59a1b7fd2e6e66e0ce75ee3e0aac04362f677613 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -790,6 +790,10 @@ bool BrowserThemePack::GetColor(int id, SkColor* color) const {
for (size_t i = 0; i < kColorTableLength; ++i) {
if (colors_[i].id == id) {
*color = colors_[i].color;
+ // The theme provider is intentionally made to ignore alpha for toolbar
+ // color, as we don't want to allow transparent toolbars.
+ if (id == ThemeProperties::COLOR_TOOLBAR)
+ *color = SkColorSetA(*color, SK_AlphaOPAQUE);
return true;
}
}
« no previous file with comments | « no previous file | chrome/browser/themes/browser_theme_pack_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698