[gnome-control-center] background: Ensure that the chooser is tall enough with newer GTK+



commit 628f34b259f08527e96ea6815881711650098f19
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Mar 1 14:28:51 2016 +0100

    background: Ensure that the chooser is tall enough with newer GTK+
    
    We should be pairing gtk_window_get_size with
    gtk_window_set_default_size to avoid inconsistencies between the size
    reading and setting code. eg., in recent GTK+ versions,
    gtk_window_get_size and gtk_widget_set_size_request differ in their
    interpretation of the CSD chrome.
    
    However, gtk_window_set_default_size didn't work with non-resizable
    GtkWindows, until now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762548

 panels/background/cc-background-chooser-dialog.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/background/cc-background-chooser-dialog.c 
b/panels/background/cc-background-chooser-dialog.c
index bd6dfa6..fa69759 100644
--- a/panels/background/cc-background-chooser-dialog.c
+++ b/panels/background/cc-background-chooser-dialog.c
@@ -99,7 +99,7 @@ cc_background_chooser_dialog_realize (GtkWidget *widget)
 
   if (parent == NULL)
     {
-      gtk_widget_set_size_request (GTK_WIDGET (chooser), -1, 550);
+      gtk_window_set_default_size (GTK_WINDOW (chooser), -1, 550);
     }
   else if (gtk_window_is_maximized (parent))
     {
@@ -111,7 +111,7 @@ cc_background_chooser_dialog_realize (GtkWidget *widget)
       gint height;
 
       gtk_window_get_size (parent, &width, &height);
-      gtk_widget_set_size_request (GTK_WIDGET (chooser), -1, (gint) (0.9 * height));
+      gtk_window_set_default_size (GTK_WINDOW (chooser), -1, (gint) (0.9 * height));
     }
 
   GTK_WIDGET_CLASS (cc_background_chooser_dialog_parent_class)->realize (widget);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]