background: Remove a useless horizontal size request

There are three cases which affect our size calculation:
  - When the dialog is without a parent in the test application.
  - When the dialog is maximized on small screens.
  - When the dialog is used with an unmaximized parent.

The width of the chooser is much more than half the width of the parent
in the third case. So there is no point in doing it.

The width that we set for the grid in the content area is actually what
is useful.

https://bugzilla.gnome.org/show_bug.cgi?id=736366
This commit is contained in:
Debarshi Ray 2014-09-10 18:35:36 +02:00
parent 5e9274f93f
commit 16a79ae6e4

View file

@ -113,7 +113,7 @@ cc_background_chooser_dialog_realize (GtkWidget *widget)
gint height; gint height;
gtk_window_get_size (parent, &width, &height); gtk_window_get_size (parent, &width, &height);
gtk_widget_set_size_request (GTK_WIDGET (chooser), (gint) (0.5 * width), (gint) (0.9 * height)); gtk_widget_set_size_request (GTK_WIDGET (chooser), -1, (gint) (0.9 * height));
gtk_icon_view_set_columns (GTK_ICON_VIEW (chooser->priv->icon_view), 3); gtk_icon_view_set_columns (GTK_ICON_VIEW (chooser->priv->icon_view), 3);
} }