Index: gtk/gtkbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkbutton.c,v
retrieving revision 1.136
diff -u -p -r1.136 gtkbutton.c
--- gtk/gtkbutton.c	29 Sep 2005 13:42:21 -0000	1.136
+++ gtk/gtkbutton.c	16 Jan 2006 13:03:26 -0000
@@ -461,13 +461,22 @@ gtk_button_class_init (GtkButtonClass *k
 						       FALSE,
 						       GTK_PARAM_READABLE));
 
+  gtk_widget_class_install_style_property (widget_class,
+					   g_param_spec_int ("child-spacing",
+							     _("Child spacing"),
+							     _("Spacing between button edges and child."),
+							     0,
+							     G_MAXINT,
+							     CHILD_SPACING,
+							     GTK_PARAM_READABLE));
+
   gtk_settings_install_property (g_param_spec_boolean ("gtk-button-images",
 						       P_("Show button images"),
 						       P_("Whether stock icons should be shown in buttons"),
 						       TRUE,
 						       GTK_PARAM_READWRITE));
-  
-  g_type_class_add_private (gobject_class, sizeof (GtkButtonPrivate));  
+
+  g_type_class_add_private (gobject_class, sizeof (GtkButtonPrivate));
 }
 
 static void
@@ -996,16 +1005,18 @@ gtk_button_size_request (GtkWidget      
   GtkBorder default_border;
   gint focus_width;
   gint focus_pad;
+  gint child_spacing;
 
   gtk_button_get_props (button, &default_border, NULL, NULL);
   gtk_widget_style_get (GTK_WIDGET (widget),
 			"focus-line-width", &focus_width,
 			"focus-padding", &focus_pad,
+                        "child-spacing", &child_spacing,
 			NULL);
  
-  requisition->width = (GTK_CONTAINER (widget)->border_width + CHILD_SPACING +
+  requisition->width = (GTK_CONTAINER (widget)->border_width + child_spacing +
 			GTK_WIDGET (widget)->style->xthickness) * 2;
-  requisition->height = (GTK_CONTAINER (widget)->border_width + CHILD_SPACING +
+  requisition->height = (GTK_CONTAINER (widget)->border_width + child_spacing +
 			 GTK_WIDGET (widget)->style->ythickness) * 2;
 
   if (GTK_WIDGET_CAN_DEFAULT (widget))
@@ -1041,11 +1052,13 @@ gtk_button_size_allocate (GtkWidget     
   GtkBorder default_border;
   gint focus_width;
   gint focus_pad;
+  gint child_spacing;
 
   gtk_button_get_props (button, &default_border, NULL, NULL);
   gtk_widget_style_get (GTK_WIDGET (widget),
 			"focus-line-width", &focus_width,
 			"focus-padding", &focus_pad,
+                        "child-spacing", &child_spacing,
 			NULL);
  
 			    
@@ -1060,12 +1073,12 @@ gtk_button_size_allocate (GtkWidget     
 
   if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child))
     {
-      child_allocation.x = widget->allocation.x + border_width + CHILD_SPACING + xthickness;
-      child_allocation.y = widget->allocation.y + border_width + CHILD_SPACING + ythickness;
+      child_allocation.x = widget->allocation.x + border_width + child_spacing + xthickness;
+      child_allocation.y = widget->allocation.y + border_width + child_spacing + ythickness;
       
-      child_allocation.width = MAX (1, widget->allocation.width - (CHILD_SPACING + xthickness) * 2 -
+      child_allocation.width = MAX (1, widget->allocation.width - (child_spacing + xthickness) * 2 -
 				    border_width * 2);
-      child_allocation.height = MAX (1, widget->allocation.height - (CHILD_SPACING + ythickness) * 2 -
+      child_allocation.height = MAX (1, widget->allocation.height - (child_spacing + ythickness) * 2 -
 				     border_width * 2);
 
       if (GTK_WIDGET_CAN_DEFAULT (button))
