[gtk+] expander: Deprecate spacing property



commit 5f5dc1082036d0ec182ffba0445333d1c81c9166
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jan 15 08:35:39 2016 -0500

    expander: Deprecate spacing property
    
    The same can be achieved with margins on the child, and
    the spacing property gets in the way of converting the
    expander to use box gadgets.

 gtk/gtkexpander.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 28173cc..ed92658 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -363,6 +363,15 @@ gtk_expander_class_init (GtkExpanderClass *klass)
                                                          FALSE,
                                                          
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY));
 
+  /**
+   * GtkExpander:spacing:
+   *
+   * Space to put between the label and the child when the
+   * expander is expanded.
+   *
+   * Deprecated: 3.20: This property is deprecated and ignored.
+   *     Use margins on the child instead.
+   */
   g_object_class_install_property (gobject_class,
                                    PROP_SPACING,
                                    g_param_spec_int ("spacing",
@@ -371,7 +380,7 @@ gtk_expander_class_init (GtkExpanderClass *klass)
                                                      0,
                                                      G_MAXINT,
                                                      0,
-                                                     GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
+                                                     
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED));
 
   g_object_class_install_property (gobject_class,
                                    PROP_LABEL_WIDGET,
@@ -749,9 +758,9 @@ gtk_expander_allocate (GtkCssGadget        *gadget,
       GtkAllocation child_allocation;
 
       child_allocation.x = allocation->x;
-      child_allocation.y = allocation->y + title_allocation.height + priv->spacing;
+      child_allocation.y = allocation->y + title_allocation.height;
       child_allocation.width = allocation->width;
-      child_allocation.height = allocation->height - title_allocation.height - priv->spacing;
+      child_allocation.height = allocation->height - title_allocation.height;
 
       gtk_widget_size_allocate (child, &child_allocation);
     }
@@ -1641,6 +1650,8 @@ gtk_expander_get_expanded (GtkExpander *expander)
  * pixels to place between expander and the child.
  *
  * Since: 2.4
+ *
+ * Deprecated: 3.20: Use margins on the child instead.
  */
 void
 gtk_expander_set_spacing (GtkExpander *expander,
@@ -1668,6 +1679,8 @@ gtk_expander_set_spacing (GtkExpander *expander,
  * Returns: spacing between the expander and child
  *
  * Since: 2.4
+ *
+ * Deprecated: 3.20: Use margins on the child instead.
  */
 gint
 gtk_expander_get_spacing (GtkExpander *expander)


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