diff options
author | Debarshi Ray <debarshir@gnome.org> | 2013-10-03 14:32:44 +0200 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2013-10-04 13:37:13 +0200 |
commit | 7585b836be499983ffa5f862393e3ea5bfa236fe (patch) | |
tree | 201bd5f0cd20419cda3ed07f026cfd87982008be /panels/background/cc-background-chooser-dialog.c | |
parent | f06a349a2af856e4980c3b59e1f437bc91443c26 (diff) | |
download | gnome-control-center-7585b836be499983ffa5f862393e3ea5bfa236fe.tar.gz |
background: Set the size request only on the parent
Instead of setting the size on each child, set it on the parent grid
because only one of those children are visible at any given point.
We are cheating a bit by ignoring the fact there is a second child
which is always shown -- the button box. This will make the other
children lose some height and the dialog will be smaller. However it is
still too big for smaller screens.
https://bugzilla.gnome.org/show_bug.cgi?id=708943
Diffstat (limited to 'panels/background/cc-background-chooser-dialog.c')
-rw-r--r-- | panels/background/cc-background-chooser-dialog.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/panels/background/cc-background-chooser-dialog.c b/panels/background/cc-background-chooser-dialog.c index a1a9ec1ba..15682654f 100644 --- a/panels/background/cc-background-chooser-dialog.c +++ b/panels/background/cc-background-chooser-dialog.c @@ -300,6 +300,7 @@ cc_background_chooser_dialog_init (CcBackgroundChooserDialog *chooser) gtk_grid_set_row_spacing (GTK_GRID (grid), 12); gtk_grid_set_column_spacing (GTK_GRID (grid), 0); gtk_container_add (GTK_CONTAINER (vbox), grid); + gtk_widget_set_size_request (grid, 860, 550); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE); @@ -350,10 +351,6 @@ cc_background_chooser_dialog_init (CcBackgroundChooserDialog *chooser) gtk_widget_set_hexpand (priv->sw_content, TRUE); gtk_widget_set_vexpand (priv->sw_content, TRUE); gtk_container_add (GTK_CONTAINER (grid), priv->sw_content); - g_object_set (priv->sw_content, - "width-request", 860, - "height-request", 550, - NULL); priv->empty_pictures_box = gtk_grid_new (); gtk_widget_set_no_show_all (priv->empty_pictures_box, TRUE); @@ -363,10 +360,6 @@ cc_background_chooser_dialog_init (CcBackgroundChooserDialog *chooser) context = gtk_widget_get_style_context (priv->empty_pictures_box); gtk_style_context_add_class (context, "dim-label"); gtk_container_add (GTK_CONTAINER (grid), priv->empty_pictures_box); - g_object_set (priv->empty_pictures_box, - "width-request", 860, - "height-request", 550, - NULL); img = gtk_image_new_from_icon_name ("emblem-photos-symbolic", GTK_ICON_SIZE_DIALOG); gtk_image_set_pixel_size (GTK_IMAGE (img), 64); gtk_widget_set_halign (img, GTK_ALIGN_END); |