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

Side by Side Diff: ui/views/controls/textfield/native_textfield_win.cc

Issue 25039002: Always aligns text at vertically center (Textfield, Label). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/textfield/native_textfield_win.h" 5 #include "ui/views/controls/textfield/native_textfield_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 return; 295 return;
296 296
297 if (top == 0 && bottom == 0) { 297 if (top == 0 && bottom == 0) {
298 // Do nothing, default margins are 0 already. 298 // Do nothing, default margins are 0 already.
299 return; 299 return;
300 } 300 }
301 // Non-zero margins case. 301 // Non-zero margins case.
302 NOTIMPLEMENTED(); 302 NOTIMPLEMENTED();
303 } 303 }
304 304
305 void NativeTextfieldWin::UpdateVerticalAlignment() {
306 // Default alignment is vertically centered.
307 if (textfield_->vertical_alignment() != gfx::ALIGN_VCENTER)
308 NOTIMPLEMENTED();
309 }
310
311 bool NativeTextfieldWin::SetFocus() { 305 bool NativeTextfieldWin::SetFocus() {
312 // Focus the associated HWND. 306 // Focus the associated HWND.
313 //container_view_->Focus(); 307 //container_view_->Focus();
314 ::SetFocus(m_hWnd); 308 ::SetFocus(m_hWnd);
315 return true; 309 return true;
316 } 310 }
317 311
318 View* NativeTextfieldWin::GetView() { 312 View* NativeTextfieldWin::GetView() {
319 return container_view_; 313 return container_view_;
320 } 314 }
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 return true; 1309 return true;
1316 MSG msg(*GetCurrentMessage()); 1310 MSG msg(*GetCurrentMessage());
1317 // ATL doesn't set the |time| field. 1311 // ATL doesn't set the |time| field.
1318 if (!msg.time) 1312 if (!msg.time)
1319 msg.time = GetMessageTime(); 1313 msg.time = GetMessageTime();
1320 ui::MouseEvent mouse_event(msg); 1314 ui::MouseEvent mouse_event(msg);
1321 return !controller->HandleMouseEvent(textfield_, mouse_event); 1315 return !controller->HandleMouseEvent(textfield_, mouse_event);
1322 } 1316 }
1323 1317
1324 } // namespace views 1318 } // namespace views
OLDNEW
« 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