From 2436627eb4644234a9e577538ec334d224e3d2be Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 1 Dec 2013 14:55:02 -0500 Subject: [PATCH] Fix problems with dialog sizing Many dialogs contain wrapping labels, but don't set max-width-chars on them. Previously, we were capping their width at 640, but since 3.10.5, they extend all the way to the width of the screen, which is not the desired behaviour. Go back to capping the width of dialogs at 640 in the stable series. In git master, we will set max-width-chars on the labels instead. https://bugzilla.gnome.org/show_bug.cgi?id=719516 https://bugzilla.gnome.org/show_bug.cgi?id=719569 --- gtk/gtkwindow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index cf80839df6..6be50c8a31 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -5708,7 +5708,10 @@ gtk_window_guess_default_size (GtkWindow *window, &workarea); } - *width = workarea.width; + /* We still cap the width at 640, to avoid dialogs with wrapping labels + * without max-width-chars from filling the entire width of the screen + */ + *width = GTK_IS_DIALOG (window) ? 640 : workarea.width; *height = workarea.height; if (gtk_widget_get_request_mode (widget) == GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT)