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

Unified Diff: chrome/browser/ui/extensions/icon_with_badge_image_source.cc

Issue 2093973002: Ignore alpha value in extension-specified badge bg color. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: commentary 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/icon_with_badge_image_source.cc
diff --git a/chrome/browser/ui/extensions/icon_with_badge_image_source.cc b/chrome/browser/ui/extensions/icon_with_badge_image_source.cc
index 08ab72abb5ac14717c46cc9dee745f6a7e9b30c8..ff2d1fdad401726856f68c59ed47b8545f1ca5f8 100644
--- a/chrome/browser/ui/extensions/icon_with_badge_image_source.cc
+++ b/chrome/browser/ui/extensions/icon_with_badge_image_source.cc
@@ -168,9 +168,12 @@ void IconWithBadgeImageSource::PaintBadge(gfx::Canvas* canvas) {
SkColor background_color = ui::MaterialDesignController::IsModeMaterial()
? gfx::kGoogleBlue500
- : SkColorSetARGB(255, 218, 0, 24);
+ : SkColorSetRGB(218, 0, 24);
if (SkColorGetA(badge_->background_color) != SK_AlphaTRANSPARENT)
background_color = badge_->background_color;
+ // Make sure the background color is opaque. See http://crbug.com/619499
+ if (ui::MaterialDesignController::IsModeMaterial())
+ background_color = SkColorSetA(background_color, SK_AlphaOPAQUE);
canvas->Save();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698