diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-11-26 23:41:39 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-11-26 23:44:22 +0900 |
commit | e21c224f2819e6ffb32ea4cf85745e0dc5b99d57 (patch) | |
tree | bf481868e8e4988d1ff731c60507e1706f24a09b /gtk/gtkcellareaboxcontext.c | |
parent | 08cc318946e4cf1af9678d7677d24a4504f58a75 (diff) | |
download | gtk+-e21c224f2819e6ffb32ea4cf85745e0dc5b99d57.tar.gz |
Fixing GtkCellAreaBox at render time to consider height-for-width when stacked vertically
Also bullet-proofing GtkCellAreaBoxContext at allocate time.
Diffstat (limited to 'gtk/gtkcellareaboxcontext.c')
-rw-r--r-- | gtk/gtkcellareaboxcontext.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/gtk/gtkcellareaboxcontext.c b/gtk/gtkcellareaboxcontext.c index c1e27cb2bb..b49ec72c38 100644 --- a/gtk/gtkcellareaboxcontext.c +++ b/gtk/gtkcellareaboxcontext.c @@ -492,21 +492,19 @@ gtk_cell_area_box_context_allocate (GtkCellAreaContext *context, orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (area)); spacing = gtk_cell_area_box_get_spacing (GTK_CELL_AREA_BOX (area)); + g_free (priv->orientation_allocs); + priv->orientation_allocs = NULL; + priv->n_orientation_allocs = 0; + if (orientation == GTK_ORIENTATION_HORIZONTAL && width > 0) - { - g_free (priv->orientation_allocs); - priv->orientation_allocs = allocate_for_orientation (box_context, orientation, - spacing, width, height, - &priv->n_orientation_allocs); - } + priv->orientation_allocs = allocate_for_orientation (box_context, orientation, + spacing, width, height, + &priv->n_orientation_allocs); else if (orientation == GTK_ORIENTATION_VERTICAL && height > 0) - { - g_free (priv->orientation_allocs); - priv->orientation_allocs = allocate_for_orientation (box_context, orientation, - spacing, height, width, - &priv->n_orientation_allocs); - } - + priv->orientation_allocs = allocate_for_orientation (box_context, orientation, + spacing, height, width, + &priv->n_orientation_allocs); + GTK_CELL_AREA_CONTEXT_CLASS (gtk_cell_area_box_context_parent_class)->allocate (context, width, height); } |