table-layout: Remove dead code

If a column/row is expanding, n_expand has to be greater than 1.

https://bugzilla.gnome.org/show_bug.cgi?id=672557
This commit is contained in:
Jasper St. Pierre 2012-03-21 10:42:32 -04:00
parent 8c0be4181b
commit 40c345a42a

View File

@ -1001,12 +1001,8 @@ calculate_col_widths (ClutterTableLayout *self,
{
if (columns[i].expand)
{
if (n_expand)
columns[i].final_size = columns[i].pref_size
+ (extra_width / n_expand);
else
columns[i].final_size = columns[i].pref_size
+ (extra_width / priv->n_cols);
}
else
columns[i].final_size = columns[i].pref_size;
@ -1289,12 +1285,8 @@ calculate_row_heights (ClutterTableLayout *self,
{
if (rows[i].expand)
{
if (n_expand)
rows[i].final_size = rows[i].pref_size
+ (extra_height / n_expand);
else
rows[i].final_size = rows[i].pref_size
+ (extra_height / priv->n_rows);
}
else
rows[i].final_size = rows[i].pref_size;