diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-15 18:02:30 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-15 18:02:30 +0000 |
commit | 154f8bcac65142d7ae6733204c15ae52cfa320c6 (patch) | |
tree | d7375c1119946c2914ee79ef2c0e8aa195b1fbe9 /chrome/browser/views/first_run_view_base.cc | |
parent | 8144d0cea4e142ff7d7a75c84240a4bb8a7fb3a4 (diff) | |
download | chromium_src-154f8bcac65142d7ae6733204c15ae52cfa320c6.zip chromium_src-154f8bcac65142d7ae6733204c15ae52cfa320c6.tar.gz chromium_src-154f8bcac65142d7ae6733204c15ae52cfa320c6.tar.bz2 |
Convert GetPreferredSize from:
void GetPreferredSize(CSize* out);
to:
gfx::Size GetPreferredSize();
.. and update some other places to use gfx::Size as well.
http://crbug.com/2186
Review URL: http://codereview.chromium.org/7344
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/first_run_view_base.cc')
-rw-r--r-- | chrome/browser/views/first_run_view_base.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/views/first_run_view_base.cc b/chrome/browser/views/first_run_view_base.cc index 51feba4..3f5e869 100644 --- a/chrome/browser/views/first_run_view_base.cc +++ b/chrome/browser/views/first_run_view_base.cc @@ -121,27 +121,27 @@ void FirstRunViewBase::SetMinimumDialogWidth(int width) { void FirstRunViewBase::Layout() { const int kVertSpacing = 8; - CSize canvas; - GetPreferredSize(&canvas); + gfx::Size canvas = GetPreferredSize(); - CSize pref_size; - background_image_->GetPreferredSize(&pref_size); - background_image_->SetBounds(0, 0, canvas.cx, pref_size.cy); + gfx::Size pref_size = background_image_->GetPreferredSize(); + background_image_->SetBounds(0, 0, canvas.width(), pref_size.height()); int next_v_space = background_image_->y() + background_image_->height() - 2; - separator_1_->GetPreferredSize(&pref_size); - separator_1_->SetBounds(0 , next_v_space, canvas.cx + 1, pref_size.cy); + pref_size = separator_1_->GetPreferredSize(); + separator_1_->SetBounds(0, next_v_space, canvas.width() + 1, + pref_size.height()); - next_v_space = canvas.cy - kPanelSubVerticalSpacing - 2 * kVertSpacing; - separator_2_->GetPreferredSize(&pref_size); + next_v_space = canvas.height() - kPanelSubVerticalSpacing - 2 * kVertSpacing; + pref_size = separator_2_->GetPreferredSize(); separator_2_->SetBounds(kPanelHorizMargin , next_v_space, - canvas.cx - 2 * kPanelHorizMargin, pref_size.cy); + canvas.width() - 2 * kPanelHorizMargin, + pref_size.height()); next_v_space = separator_2_->y() + separator_2_->height() + kVertSpacing; - int width = canvas.cx - 2 * kPanelHorizMargin; + int width = canvas.width() - 2 * kPanelHorizMargin; int height = default_browser_->GetHeightForWidth(width); default_browser_->SetBounds(kPanelHorizMargin, next_v_space, width, height); AdjustDialogWidth(default_browser_); |