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

Unified Diff: chrome/browser/chromeos/login/username_view.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/chromeos/login/username_view.cc
===================================================================
--- chrome/browser/chromeos/login/username_view.cc (revision 104769)
+++ chrome/browser/chromeos/login/username_view.cc (working copy)
@@ -113,8 +113,9 @@
// Draw the text.
// Note, direct call of the DrawStringInt method produces the green dots
// along the text perimeter (when the label is place on the white background).
+ SkColor text_color = IsEnabled() ? enabled_color() : disabled_color();
SkColor kInvisibleHaloColor = 0x00000000;
- canvas.DrawStringWithHalo(GetText(), font(), GetColor(),
+ canvas.DrawStringWithHalo(GetText(), font(), text_color,
kInvisibleHaloColor, bounds.x() + margin_width_,
bounds.y(), bounds.width() - 2 * margin_width_,
bounds.height(), flags);

Powered by Google App Engine
This is Rietveld 408576698