diff options
Diffstat (limited to 'chrome/browser/views/first_run_view.cc')
-rw-r--r-- | chrome/browser/views/first_run_view.cc | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/chrome/browser/views/first_run_view.cc b/chrome/browser/views/first_run_view.cc index e310e0a..72ed29a 100644 --- a/chrome/browser/views/first_run_view.cc +++ b/chrome/browser/views/first_run_view.cc @@ -94,11 +94,10 @@ void FirstRunView::SetupControls() { AddChildView(customize_link_); } -void FirstRunView::GetPreferredSize(CSize *out) { - DCHECK(out); - *out = ChromeViews::Window::GetLocalizedContentsSize( +gfx::Size FirstRunView::GetPreferredSize() { + return gfx::Size(ChromeViews::Window::GetLocalizedContentsSize( IDS_FIRSTRUN_DIALOG_WIDTH_CHARS, - IDS_FIRSTRUN_DIALOG_HEIGHT_LINES).ToSIZE(); + IDS_FIRSTRUN_DIALOG_HEIGHT_LINES)); } void FirstRunView::Layout() { @@ -107,21 +106,20 @@ void FirstRunView::Layout() { const int kVertSpacing = 8; ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - CSize pref_size; - welcome_label_->GetPreferredSize(&pref_size); + gfx::Size pref_size = welcome_label_->GetPreferredSize(); // Wrap the label text before we overlap the product icon. int label_width = background_image()->width() - rb.GetBitmapNamed(IDR_WIZARD_ICON)->width() - kPanelHorizMargin; welcome_label_->SetBounds(kPanelHorizMargin, kPanelVertMargin, - label_width, pref_size.cy); + label_width, pref_size.height()); AdjustDialogWidth(welcome_label_); int next_v_space = background_image()->y() + background_image()->height() + kPanelVertMargin; - actions_label_->GetPreferredSize(&pref_size); + pref_size = actions_label_->GetPreferredSize(); actions_label_->SetBounds(kPanelHorizMargin, next_v_space, - pref_size.cx, pref_size.cy); + pref_size.width(), pref_size.height()); AdjustDialogWidth(actions_label_); next_v_space = actions_label_->y() + @@ -145,9 +143,9 @@ void FirstRunView::Layout() { actions_shorcuts_->height() + kUnrelatedControlVerticalSpacing; - customize_link_->GetPreferredSize(&pref_size); + pref_size = customize_link_->GetPreferredSize(); customize_link_->SetBounds(kPanelHorizMargin, next_v_space, - pref_size.cx, pref_size.cy); + pref_size.width(), pref_size.height()); } void FirstRunView::OpenCustomizeDialog() { |