diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 01:02:48 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 01:02:48 +0000 |
commit | 7e9e8584da57a63465cd9619fb023a427e8d6bfe (patch) | |
tree | 7c48819af74a1e84cd2c70214395f1a526ec7c27 /chrome/browser/gtk/first_run_dialog.cc | |
parent | 7a474897a7a974db69a41756a734239d4b9a2b8d (diff) | |
download | chromium_src-7e9e8584da57a63465cd9619fb023a427e8d6bfe.zip chromium_src-7e9e8584da57a63465cd9619fb023a427e8d6bfe.tar.gz chromium_src-7e9e8584da57a63465cd9619fb023a427e8d6bfe.tar.bz2 |
Linux: Prevent first-run bubble from getting clipped on high-DPI displays.
Avoids setting the width of the contents vbox (so it can grow if the
combined width of the two buttons exceeds the estimated width of the
bubble's text) and fixes an issue where we were getting even-more-bogus
estimates due to using an unrealized widget.
Also adds a DCHECK() to catch future code that passes unrealized
widgets to gtk_util::GetWidgetSizeFromResources() (I checked the
existing calls to it and they all look fine).
BUG=23367
TEST=tested first-run bubble on displays with various DPIs (75, 120, 200, etc.)
Review URL: http://codereview.chromium.org/265023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/first_run_dialog.cc')
-rw-r--r-- | chrome/browser/gtk/first_run_dialog.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/gtk/first_run_dialog.cc b/chrome/browser/gtk/first_run_dialog.cc index b8797c9..aab26cb 100644 --- a/chrome/browser/gtk/first_run_dialog.cc +++ b/chrome/browser/gtk/first_run_dialog.cc @@ -43,6 +43,8 @@ FirstRunDialog::FirstRunDialog(Profile* profile, int& response) GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT); gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); + + gtk_widget_realize(dialog_); int width, height; gtk_util::GetWidgetSizeFromResources(dialog_, IDS_FIRSTRUN_DIALOG_WIDTH_CHARS, |