summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/about_chrome_view.cc
diff options
context:
space:
mode:
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-19 04:37:48 +0000
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-19 04:37:48 +0000
commitaef3555aa83038b26b50cfab04d685e0f6dfc04f (patch)
tree48b442155ef8b7ad6a596d9c5b918996ef2b3fde /chrome/browser/views/about_chrome_view.cc
parentf7daade0fd1b9c4607c31de021ffbdaa877ff792 (diff)
downloadchromium_src-aef3555aa83038b26b50cfab04d685e0f6dfc04f.zip
chromium_src-aef3555aa83038b26b50cfab04d685e0f6dfc04f.tar.gz
chromium_src-aef3555aa83038b26b50cfab04d685e0f6dfc04f.tar.bz2
Issue 3487: We now set the bounds for the links in the About box as soon as we know where they should be placed, instead of waiting until the Layout call to do so. This fixes an issue of the links not appearing at all -- something, that I can't reproduce myself, but Darin could on his Vista machine (until he tried this fix).
Review URL: http://codereview.chromium.org/7513 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/about_chrome_view.cc')
-rw-r--r--chrome/browser/views/about_chrome_view.cc37
1 files changed, 18 insertions, 19 deletions
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc
index 7802025..1ef5292 100644
--- a/chrome/browser/views/about_chrome_view.cc
+++ b/chrome/browser/views/about_chrome_view.cc
@@ -272,25 +272,6 @@ void AboutChromeView::Layout() {
sz.width(),
main_text_label_height_);
- // Position the URLs within the main label. The rects here are calculated when
- // we draw the strings. First position the Chromium URL within the main label.
- chromium_url_->SetBounds(chromium_url_rect_.x(),
- chromium_url_rect_.y(),
- chromium_url_rect_.width(),
- chromium_url_rect_.height());
- // Then position the Open Source URL within the main label.
- open_source_url_->SetBounds(open_source_url_rect_.x(),
- open_source_url_rect_.y(),
- open_source_url_rect_.width(),
- open_source_url_rect_.height());
-#if defined(GOOGLE_CHROME_BUILD)
- // Then position the TOS URL within the main label.
- terms_of_service_url_->SetBounds(terms_of_service_url_rect_.x(),
- terms_of_service_url_rect_.y(),
- terms_of_service_url_rect_.width(),
- terms_of_service_url_rect_.height());
-#endif
-
// Get the y-coordinate of our parent so we can position the text left of the
// buttons at the bottom.
gfx::Rect parent_bounds = GetParent()->GetLocalBounds(false);
@@ -374,8 +355,26 @@ void AboutChromeView::Paint(ChromeCanvas* canvas) {
// The last text chunk doesn't have a URL associated with it.
DrawTextStartingFrom(canvas, main_label_chunk5_, &position, label_bounds,
font);
+
+ // Position the TOS URL within the main label.
+ terms_of_service_url_->SetBounds(terms_of_service_url_rect_.x(),
+ terms_of_service_url_rect_.y(),
+ terms_of_service_url_rect_.width(),
+ terms_of_service_url_rect_.height());
#endif
+ // Position the URLs within the main label. First position the Chromium URL
+ // within the main label.
+ chromium_url_->SetBounds(chromium_url_rect_.x(),
+ chromium_url_rect_.y(),
+ chromium_url_rect_.width(),
+ chromium_url_rect_.height());
+ // Then position the Open Source URL within the main label.
+ open_source_url_->SetBounds(open_source_url_rect_.x(),
+ open_source_url_rect_.y(),
+ open_source_url_rect_.width(),
+ open_source_url_rect_.height());
+
// Save the height so we can set the bounds correctly.
main_text_label_height_ = position.height() + font.height();
}