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

Unified Diff: ui/views/controls/textfield/native_textfield_views.cc

Issue 17517005: Match the NativeTextfieldViews cursor color to the text color. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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: ui/views/controls/textfield/native_textfield_views.cc
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc
index 0e807556ef17f3f3ed9fc71fa049f1fdfb8492cf..f24ce0861cb1e6bb8b660c4f76b954c6e4e24ffd 100644
--- a/ui/views/controls/textfield/native_textfield_views.cc
+++ b/ui/views/controls/textfield/native_textfield_views.cc
@@ -54,9 +54,6 @@
namespace {
-// Default "system" color for text cursor.
-const SkColor kDefaultCursorColor = SK_ColorBLACK;
-
void ConvertRectToScreen(const views::View* src, gfx::Rect* r) {
DCHECK(src);
@@ -1127,7 +1124,7 @@ void NativeTextfieldViews::UpdateColorsFromTheme(const ui::NativeTheme* theme) {
UpdateTextColor();
UpdateBackgroundColor();
gfx::RenderText* render_text = GetRenderText();
- render_text->set_cursor_color(kDefaultCursorColor);
+ render_text->set_cursor_color(textfield_->GetTextColor());
render_text->set_selection_color(theme->GetSystemColor(
ui::NativeTheme::kColorId_TextfieldSelectionColor));
render_text->set_selection_background_focused_color(theme->GetSystemColor(
« 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