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

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

Issue 10310131: Support placeholder text in NativeTextfieldViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for comments in #3 Created 8 years, 7 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 | « ui/views/controls/textfield/textfield.h ('k') | ui/views/examples/textfield_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 2243e15f7978cfe4795aa888ed642463a332d315..66291060b17b615696ef37256aa8b715e2df19f2 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -27,6 +27,13 @@
#include "ui/views/controls/textfield/native_textfield_win.h"
#endif
+namespace {
+
+// Default placeholder text color.
+const SkColor kDefaultPlaceholderTextColor = SK_ColorLTGRAY;
+
+} // namespace
+
namespace views {
// static
@@ -51,6 +58,7 @@ Textfield::Textfield()
initialized_(false),
horizontal_margins_were_set_(false),
vertical_margins_were_set_(false),
+ placeholder_text_color_(kDefaultPlaceholderTextColor),
text_input_type_(ui::TEXT_INPUT_TYPE_TEXT) {
set_focusable(true);
}
@@ -71,6 +79,7 @@ Textfield::Textfield(StyleFlags style)
initialized_(false),
horizontal_margins_were_set_(false),
vertical_margins_were_set_(false),
+ placeholder_text_color_(kDefaultPlaceholderTextColor),
text_input_type_(ui::TEXT_INPUT_TYPE_TEXT) {
set_focusable(true);
if (IsObscured())
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | ui/views/examples/textfield_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698