diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 17:47:33 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 17:47:33 +0000 |
commit | d1c4b0b7d84176bc9836a43016dde82f13dcb9b1 (patch) | |
tree | cd5d354d406a7aa121bfc2a0d1dcdb6c79eafc13 /chrome | |
parent | 05a5efce4b33e6c282659bf77003b5523ab5b292 (diff) | |
download | chromium_src-d1c4b0b7d84176bc9836a43016dde82f13dcb9b1.zip chromium_src-d1c4b0b7d84176bc9836a43016dde82f13dcb9b1.tar.gz chromium_src-d1c4b0b7d84176bc9836a43016dde82f13dcb9b1.tar.bz2 |
Wrap text in the chrome first run dialog.
TEST=run chrome --lang=de --first-run and make sure the first bullet point wraps properly
BUG=1297554
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@521 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/views/first_run_view.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/chrome/browser/views/first_run_view.cc b/chrome/browser/views/first_run_view.cc index d230efa..404c732 100644 --- a/chrome/browser/views/first_run_view.cc +++ b/chrome/browser/views/first_run_view.cc @@ -144,22 +144,18 @@ void FirstRunView::Layout() { next_v_space = actions_label_->GetY() + actions_label_->GetHeight() + kVertSpacing; - - // First give the label some width, so that GetPreferredSize can return us a - // reasonable height... - actions_import_->SetBounds(0, 0, GetWidth() - kPanelHorizMargin, 0); - actions_import_->GetPreferredSize(&pref_size); - actions_import_->SetBounds(kPanelHorizMargin, next_v_space, - pref_size.cx + 100, pref_size.cy); + int label_width = GetWidth() - (2 * kPanelHorizMargin); + int label_height = actions_import_->GetHeightForWidth(label_width); + actions_import_->SetBounds(kPanelHorizMargin, next_v_space, label_width, + label_height); next_v_space = actions_import_->GetY() + actions_import_->GetHeight() + kVertSpacing; AdjustDialogWidth(actions_import_); - actions_shorcuts_->SetBounds(0, 0, GetWidth() - kPanelHorizMargin, 0); - actions_shorcuts_->GetPreferredSize(&pref_size); - actions_shorcuts_->SetBounds(kPanelHorizMargin, next_v_space, - pref_size.cx, pref_size.cy); + label_height = actions_shorcuts_->GetHeightForWidth(label_width); + actions_shorcuts_->SetBounds(kPanelHorizMargin, next_v_space, label_width, + label_height); AdjustDialogWidth(actions_shorcuts_); next_v_space = actions_shorcuts_->GetY() + |