summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2013-10-04 21:41:46 +0200
committerFlorian Müllner <fmuellner@gnome.org>2013-10-07 13:24:51 +0200
commit3435d017e27755353123ca8f65bfe3c051102b48 (patch)
tree4e449a2a8a4037877098904d53bd60d5b4f2c351
parent44b1a808c8a74fd3b97367f4819fabcc46a1eb23 (diff)
downloadclutter-3435d017e27755353123ca8f65bfe3c051102b48.tar.gz
table-layout: Base space calculations on visible children
This is what we already do in the actual size requests, it makes sense to do the same in the space calculations. https://bugzilla.gnome.org/show_bug.cgi?id=709434
-rw-r--r--clutter/clutter-table-layout.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/clutter/clutter-table-layout.c b/clutter/clutter-table-layout.c
index 1cea72187..f95b8c053 100644
--- a/clutter/clutter-table-layout.c
+++ b/clutter/clutter-table-layout.c
@@ -883,8 +883,8 @@ calculate_col_widths (ClutterTableLayout *self,
n_expand++;
}
- pref_width += priv->col_spacing * (priv->n_cols - 1);
- min_width += priv->col_spacing * (priv->n_cols - 1);
+ pref_width += priv->col_spacing * MAX (priv->visible_cols - 1, 0);
+ min_width += priv->col_spacing * MAX (priv->visible_cols - 1, 0);
if (for_width <= min_width)
{
@@ -1173,8 +1173,8 @@ calculate_row_heights (ClutterTableLayout *self,
n_expand++;
}
- pref_height += priv->row_spacing * (priv->n_rows - 1);
- min_height += priv->row_spacing * (priv->n_rows - 1);
+ pref_height += priv->row_spacing * MAX (priv->visible_rows - 1, 0);
+ min_height += priv->row_spacing * MAX (priv->visible_rows - 1, 0);
if (for_height <= min_height)
{