Some api changes for GtkWrapBox
Ammended documentation for GTK_WRAP_BOX_SPREAD_EVEN and renamed GTK_WRAP_BOX_SPREAD_BEGIN -> GTK_WRAP_BOX_SPREAD_START.
This commit is contained in:
@ -559,15 +559,15 @@ typedef enum {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkWrapBoxSpreading:
|
* GtkWrapBoxSpreading:
|
||||||
* @GTK_WRAP_BOX_SPREAD_BEGIN: Items are allocated no more than their natural size
|
* @GTK_WRAP_BOX_SPREAD_START: Children are allocated no more than their natural size
|
||||||
* in the layout's orientation and any extra space is left trailing at
|
* in the layout's orientation and any extra space is left trailing at
|
||||||
* the end of each line.
|
* the end of each line.
|
||||||
* @GTK_WRAP_BOX_SPREAD_END: Items are allocated no more than their natural size
|
* @GTK_WRAP_BOX_SPREAD_END: Children are allocated no more than their natural size
|
||||||
* in the layout's orientation and any extra space skipped at the beginning
|
* in the layout's orientation and any extra space skipped at the beginning
|
||||||
* of each line.
|
* of each line.
|
||||||
* @GTK_WRAP_BOX_SPREAD_EVEN: Items are allocated no more than their natural size
|
* @GTK_WRAP_BOX_SPREAD_EVEN: Children are allocated no more than their natural size
|
||||||
* in the layout's orientation and any extra space is evenly distributed
|
* in the layout's orientation and any extra space is evenly distributed
|
||||||
* between children.
|
* as empty space between children.
|
||||||
* @GTK_WRAP_BOX_SPREAD_EXPAND: Items share the extra space evenly (or among children that 'expand' when
|
* @GTK_WRAP_BOX_SPREAD_EXPAND: Items share the extra space evenly (or among children that 'expand' when
|
||||||
* in %GTK_WRAP_ALLOCATE_FREE mode.
|
* in %GTK_WRAP_ALLOCATE_FREE mode.
|
||||||
*
|
*
|
||||||
@ -582,7 +582,7 @@ typedef enum {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GTK_WRAP_BOX_SPREAD_BEGIN = 0,
|
GTK_WRAP_BOX_SPREAD_START = 0,
|
||||||
GTK_WRAP_BOX_SPREAD_END,
|
GTK_WRAP_BOX_SPREAD_END,
|
||||||
GTK_WRAP_BOX_SPREAD_EVEN,
|
GTK_WRAP_BOX_SPREAD_EVEN,
|
||||||
GTK_WRAP_BOX_SPREAD_EXPAND
|
GTK_WRAP_BOX_SPREAD_EXPAND
|
||||||
|
|||||||
@ -200,7 +200,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
P_("Spreading"),
|
P_("Spreading"),
|
||||||
P_("The spreading mode to use"),
|
P_("The spreading mode to use"),
|
||||||
GTK_TYPE_WRAP_BOX_SPREADING,
|
GTK_TYPE_WRAP_BOX_SPREADING,
|
||||||
GTK_WRAP_BOX_SPREAD_BEGIN,
|
GTK_WRAP_BOX_SPREAD_START,
|
||||||
GTK_PARAM_READWRITE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
|
|
||||||
@ -382,7 +382,7 @@ gtk_wrap_box_init (GtkWrapBox *box)
|
|||||||
|
|
||||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||||
priv->mode = GTK_WRAP_ALLOCATE_FREE;
|
priv->mode = GTK_WRAP_ALLOCATE_FREE;
|
||||||
priv->spreading = GTK_WRAP_BOX_SPREAD_BEGIN;
|
priv->spreading = GTK_WRAP_BOX_SPREAD_START;
|
||||||
priv->vertical_spacing = 0;
|
priv->vertical_spacing = 0;
|
||||||
priv->horizontal_spacing = 0;
|
priv->horizontal_spacing = 0;
|
||||||
priv->children = NULL;
|
priv->children = NULL;
|
||||||
@ -1036,7 +1036,7 @@ gtk_wrap_box_size_allocate (GtkWidget *widget,
|
|||||||
if (priv->spreading != GTK_WRAP_BOX_SPREAD_EXPAND)
|
if (priv->spreading != GTK_WRAP_BOX_SPREAD_EXPAND)
|
||||||
item_size = MIN (item_size, nat_item_size);
|
item_size = MIN (item_size, nat_item_size);
|
||||||
|
|
||||||
/* Get the real extra pixels incase of GTK_WRAP_BOX_SPREAD_BEGIN lines */
|
/* Get the real extra pixels incase of GTK_WRAP_BOX_SPREAD_START lines */
|
||||||
extra_pixels = avail_size - (line_length - 1) * item_spacing - item_size * line_length;
|
extra_pixels = avail_size - (line_length - 1) * item_spacing - item_size * line_length;
|
||||||
extra_per_item = extra_pixels / MAX (line_length -1, 1);
|
extra_per_item = extra_pixels / MAX (line_length -1, 1);
|
||||||
extra_extra = extra_pixels % MAX (line_length -1, 1);
|
extra_extra = extra_pixels % MAX (line_length -1, 1);
|
||||||
|
|||||||
@ -91,6 +91,7 @@ void gtk_wrap_box_insert_child (GtkWrapBox
|
|||||||
gboolean yexpand,
|
gboolean yexpand,
|
||||||
gboolean xfill,
|
gboolean xfill,
|
||||||
gboolean yfill);
|
gboolean yfill);
|
||||||
|
|
||||||
void gtk_wrap_box_reorder_child (GtkWrapBox *layout,
|
void gtk_wrap_box_reorder_child (GtkWrapBox *layout,
|
||||||
GtkWidget *widget,
|
GtkWidget *widget,
|
||||||
guint index);
|
guint index);
|
||||||
|
|||||||
@ -29,7 +29,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define INITIAL_ALLOCATION_MODE GTK_WRAP_ALLOCATE_HOMOGENEOUS
|
#define INITIAL_ALLOCATION_MODE GTK_WRAP_ALLOCATE_HOMOGENEOUS
|
||||||
#define INITIAL_SPREADING GTK_WRAP_BOX_SPREAD_BEGIN
|
#define INITIAL_SPREADING GTK_WRAP_BOX_SPREAD_START
|
||||||
#define INITIAL_MINIMUM_LENGTH 3
|
#define INITIAL_MINIMUM_LENGTH 3
|
||||||
#define INITIAL_HSPACING 2
|
#define INITIAL_HSPACING 2
|
||||||
#define INITIAL_VSPACING 2
|
#define INITIAL_VSPACING 2
|
||||||
@ -302,7 +302,7 @@ create_window (void)
|
|||||||
|
|
||||||
/* Add Spreading control */
|
/* Add Spreading control */
|
||||||
widget = gtk_combo_box_new_text ();
|
widget = gtk_combo_box_new_text ();
|
||||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Spread Begin");
|
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Spread Start");
|
||||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Spread End");
|
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Spread End");
|
||||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Spread Even");
|
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Spread Even");
|
||||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Spread Expand");
|
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Spread Expand");
|
||||||
|
|||||||
Reference in New Issue
Block a user