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

Unified Diff: chrome/browser/ui/views/infobars/infobar_background.cc

Issue 8221027: Make views::Label and views::Link auto-color themselves to be readable over their background colo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
Index: chrome/browser/ui/views/infobars/infobar_background.cc
===================================================================
--- chrome/browser/ui/views/infobars/infobar_background.cc (revision 104959)
+++ chrome/browser/ui/views/infobars/infobar_background.cc (working copy)
@@ -8,6 +8,7 @@
#include "chrome/browser/ui/views/infobars/infobar_view.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/canvas_skia_paint.h"
+#include "ui/gfx/color_utils.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "views/view.h"
@@ -15,6 +16,8 @@
: separator_color_(SK_ColorBLACK),
top_color_(GetInfoBarTopColor(infobar_type)),
bottom_color_(GetInfoBarBottomColor(infobar_type)) {
+ SetNativeControlColor(
+ color_utils::AlphaBlend(top_color_, bottom_color_, 128));
}
InfoBarBackground::~InfoBarBackground() {
« no previous file with comments | « chrome/browser/ui/views/infobars/confirm_infobar.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698