Fix clutter_table_layout_pack row/column count incrementation.

When appending (with a negative row/column parameter), the row/column
count should be incremented by 1, not 2. This also fixes layout errors
when using column/row spacing: The amount of extra space required was
calculated incorrectly due to the wrong column count.

https://bugzilla.gnome.org/show_bug.cgi?id=679990
This commit is contained in:
Andre Kuehne 2012-07-18 20:57:00 +02:00 committed by Emmanuele Bassi
parent 59801ef854
commit d332255111

View File

@ -1905,10 +1905,10 @@ clutter_table_layout_pack (ClutterTableLayout *layout,
g_assert (CLUTTER_IS_TABLE_CHILD (meta)); g_assert (CLUTTER_IS_TABLE_CHILD (meta));
if (row < 0) if (row < 0)
row = priv->n_rows + 1; row = priv->n_rows;
if (column < 0) if (column < 0)
column = priv->n_cols + 1; column = priv->n_cols;
table_child_set_position (CLUTTER_TABLE_CHILD (meta), column, row); table_child_set_position (CLUTTER_TABLE_CHILD (meta), column, row);
} }