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

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

Issue 11421204: Use native theme colors for textfields; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase, add a blank line between includes. Created 8 years 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: ui/views/controls/textfield/native_textfield_win.cc
diff --git a/ui/views/controls/textfield/native_textfield_win.cc b/ui/views/controls/textfield/native_textfield_win.cc
index 916b19d38fb9598288d0ea627ff35e077edc3c51..7566bafa301a4c9379289e70a4f46ce9d18862ba 100644
--- a/ui/views/controls/textfield/native_textfield_win.cc
+++ b/ui/views/controls/textfield/native_textfield_win.cc
@@ -249,25 +249,13 @@ void NativeTextfieldWin::UpdateBorder() {
void NativeTextfieldWin::UpdateTextColor() {
CHARFORMAT cf = {0};
cf.dwMask = CFM_COLOR;
- cf.crTextColor = textfield_->use_default_text_color() ?
- GetSysColor(textfield_->read_only() ? COLOR_GRAYTEXT : COLOR_WINDOWTEXT) :
- skia::SkColorToCOLORREF(textfield_->text_color());
+ cf.crTextColor = skia::SkColorToCOLORREF(textfield_->GetTextColor());
CRichEditCtrl::SetDefaultCharFormat(cf);
}
void NativeTextfieldWin::UpdateBackgroundColor() {
- if (!textfield_->use_default_background_color()) {
- bg_color_ = skia::SkColorToCOLORREF(textfield_->background_color());
- } else {
- bg_color_ = GetSysColor(textfield_->read_only() ? COLOR_3DFACE
- : COLOR_WINDOW);
- }
- CRichEditCtrl::SetBackgroundColor(bg_color_);
-}
-
-void NativeTextfieldWin::UpdateCursorColor() {
- if (!textfield_->use_default_cursor_color())
- NOTIMPLEMENTED();
+ CRichEditCtrl::SetBackgroundColor(
+ skia::SkColorToCOLORREF(textfield_->GetBackgroundColor()));
}
void NativeTextfieldWin::UpdateReadOnly() {
@@ -387,6 +375,17 @@ size_t NativeTextfieldWin::GetCursorPosition() const {
return 0U;
}
+bool NativeTextfieldWin::GetCursorEnabled() const {
+ // TODO(msw): Implement.
+ NOTIMPLEMENTED();
+ return true;
+}
+
+void NativeTextfieldWin::SetCursorEnabled(bool enabled) {
+ // TODO(msw): Implement.
+ NOTIMPLEMENTED();
+}
+
bool NativeTextfieldWin::HandleKeyPressed(const ui::KeyEvent& event) {
return false;
}
« no previous file with comments | « ui/views/controls/textfield/native_textfield_win.h ('k') | ui/views/controls/textfield/native_textfield_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698