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

Unified Diff: chrome/views/text_field.cc

Issue 7344: Convert GetPreferredSize from:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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/views/text_field.cc
===================================================================
--- chrome/views/text_field.cc (revision 3391)
+++ chrome/views/text_field.cc (working copy)
@@ -850,11 +850,12 @@
Layout();
}
-void TextField::GetPreferredSize(CSize *out) {
+gfx::Size TextField::GetPreferredSize() {
gfx::Insets insets;
CalculateInsets(&insets);
- out->cx = default_width_in_chars_ * font_.ave_char_width() + insets.width();
- out->cy = num_lines_ * font_.height() + insets.height();
+ return gfx::Size(default_width_in_chars_ * font_.ave_char_width() +
+ insets.width(),
+ num_lines_ * font_.height() + insets.height());
}
std::wstring TextField::GetText() const {

Powered by Google App Engine
This is Rietveld 408576698