summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 14:03:55 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 14:03:55 +0000
commit495f583aaa9ce1e2b02d6f38005a7c4faab6119f (patch)
tree75353c4fbdf2dcc43ecac6f37a1b1b8b6a6d85d4
parent2a61bc60abd2650022a843d47cf5bc78ce13e8d0 (diff)
downloadchromium_src-495f583aaa9ce1e2b02d6f38005a7c4faab6119f.zip
chromium_src-495f583aaa9ce1e2b02d6f38005a7c4faab6119f.tar.gz
chromium_src-495f583aaa9ce1e2b02d6f38005a7c4faab6119f.tar.bz2
linux: use minimum size rather than forcing dialog size
The previous code forced a dialog size, but what we really want is to just set the minimum size. BUG=36723 TEST=pt_BR dialogs look ok, de_DE dialogs are still wide Review URL: http://codereview.chromium.org/660079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40015 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/gtk_util.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc
index 66971b5..cdc637d 100644
--- a/chrome/common/gtk_util.cc
+++ b/chrome/common/gtk_util.cc
@@ -251,7 +251,17 @@ void SetWindowSizeFromResources(GtkWindow* window,
if (resizable) {
gtk_window_set_default_size(window, width, height);
} else {
- gtk_widget_set_size_request(GTK_WIDGET(window), width, height);
+ // For a non-resizable window, GTK tries to snap the window size
+ // to the minimum size around the content. We still want to set
+ // the *minimum* window size to allow windows with long titles to
+ // be wide enough to display their titles, but if GTK needs to
+ // make the window *wider* due to very wide controls, we should
+ // allow that too.
+ GdkGeometry geometry;
+ geometry.min_width = width;
+ geometry.min_height = height;
+ gtk_window_set_geometry_hints(window, GTK_WIDGET(window),
+ &geometry, GDK_HINT_MIN_SIZE);
}
gtk_window_set_resizable(window, resizable ? TRUE : FALSE);
}