]> Pileus Git - ~andy/gtk/commitdiff
Improve docs about GtkStyleContext padding/border/margin
authorMilan Bouchet-Valat <nalimilan@club.fr>
Sat, 8 Jan 2011 17:11:59 +0000 (18:11 +0100)
committerMilan Bouchet-Valat <nalimilan@club.fr>
Tue, 11 Jan 2011 11:28:54 +0000 (12:28 +0100)
GTK_STYLE_PROPERTY_BORDER_WIDTH is of style GtkBorder, not gint.

Also make it clearer what the definition and ordering of these 3
properties is. Reorder them in the header to be more logical.

gtk/gtkstylecontext.c
gtk/gtkstylecontext.h

index 326364cf45114c7d8fd06c62665f2499fdb903dd..9d9cdb239ccd596baa545f5be88d49fc372037e2 100644 (file)
@@ -3421,6 +3421,7 @@ gtk_style_context_get_border_color (GtkStyleContext *context,
  * @border: (out): return value for the border settings
  *
  * Gets the border for a given state as a #GtkBorder.
+ * See %GTK_STYLE_PROPERTY_BORDER_WIDTH.
  *
  * Since: 3.0
  **/
@@ -3460,6 +3461,7 @@ gtk_style_context_get_border (GtkStyleContext *context,
  * @padding: (out): return value for the padding settings
  *
  * Gets the padding for a given state as a #GtkBorder.
+ * See %GTK_STYLE_PROPERTY_PADDING.
  *
  * Since: 3.0
  **/
@@ -3499,6 +3501,7 @@ gtk_style_context_get_padding (GtkStyleContext *context,
  * @margin: (out): return value for the margin settings
  *
  * Gets the margin for a given state as a #GtkBorder.
+ * See %GTK_STYLE_PROPERTY_MARGIN.
  *
  * Since: 3.0
  **/
index 291b8a77f3fa1a6b0e98aab074ad7131a4ec271b..a2ab473546b7a898cc8215e6bfdead12d01c436c 100644 (file)
@@ -78,31 +78,40 @@ struct _GtkStyleContextClass
  */
 #define GTK_STYLE_PROPERTY_FONT "font"
 
-/**
- * GTK_STYLE_PROPERTY_MARGIN:
- *
- * A property holding the rendered element's margin as a #GtkBorder. The
- * margin is defined as the spacing between the border of the element
- * and its surrounding elements.
- */
-#define GTK_STYLE_PROPERTY_MARGIN "margin"
-
 /**
  * GTK_STYLE_PROPERTY_PADDING:
  *
  * A property holding the rendered element's padding as a #GtkBorder. The
  * padding is defined as the spacing between the inner part of the element border
- * and its child.
+ * and its child. It's the innermost spacing property of the padding/border/margin
+ * series.
  */
 #define GTK_STYLE_PROPERTY_PADDING "padding"
 
 /**
  * GTK_STYLE_PROPERTY_BORDER_WIDTH:
  *
- * A property holding the rendered element's border width in pixels as a #gint.
+ * A property holding the rendered element's border width in pixels as
+ * a #GtkBorder. The border is the intermediary spacing property of the
+ * padding/border/margin series.
+ *
+ * gtk_render_frame() uses this property to find out the frame line width,
+ * so #GtkWidget<!-- -->s rendering frames may need to add up this padding when
+ * requesting size
  */
 #define GTK_STYLE_PROPERTY_BORDER_WIDTH "border-width"
 
+/**
+ * GTK_STYLE_PROPERTY_MARGIN:
+ *
+ * A property holding the rendered element's margin as a #GtkBorder. The
+ * margin is defined as the spacing between the border of the element
+ * and its surrounding elements. It is external to #GtkWidget<!-- -->s's
+ * size allocations, and the most external spacing property of the
+ * padding/border/margin series.
+ */
+#define GTK_STYLE_PROPERTY_MARGIN "margin"
+
 /**
  * GTK_STYLE_PROPERTY_BORDER_RADIUS:
  *