[gtk+] button: make gtk_button_get_props() return the padding too
- From: Cosimo Cecchi <cosimoc src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk+] button: make gtk_button_get_props() return the padding too
 
- Date: Tue, 12 Apr 2011 21:15:08 +0000 (UTC)
 
commit f1a7be7f57234255b5c693285d8db499ca21f682
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Apr 5 15:34:32 2011 -0400
    button: make gtk_button_get_props() return the padding too
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646882
 gtk/gtkbutton.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index c3838d9..ea19b41 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -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
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]