]> Pileus Git - ~andy/gtk/commitdiff
button: make gtk_button_get_props() return the padding too
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 5 Apr 2011 19:34:32 +0000 (15:34 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 12 Apr 2011 21:14:29 +0000 (17:14 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=646882

gtk/gtkbutton.c

index c3838d9253ffecde1b3349e09fafcdf929e2d825..ea19b4180210d38c6895548694ab1509e9f6b708 100644 (file)
@@ -1398,12 +1398,15 @@ gtk_button_get_props (GtkButton *button,
                      GtkBorder *default_border,
                      GtkBorder *default_outside_border,
                       GtkBorder *inner_border,
+                      GtkBorder *padding,
                      gboolean  *interior_focus)
 {
   GtkStyleContext *context;
+  GtkStateFlags state;
   GtkBorder *tmp_border;
 
   context = gtk_widget_get_style_context (GTK_WIDGET (button));
+  state = gtk_style_context_get_state (context);
 
   if (default_border)
     {
@@ -1456,6 +1459,9 @@ gtk_button_get_props (GtkButton *button,
                                    "interior-focus", interior_focus,
                                    NULL);
     }
+
+  if (padding)
+    gtk_style_context_get_padding (context, state, padding);
 }
 
 static void