[clutter/clutter-1.14] table-layout: Base space calculations on visible children
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.14] table-layout: Base space calculations on visible children
- Date: Thu, 21 Nov 2013 00:09:52 +0000 (UTC)
commit e2aed8b5d81511e465d0f279a7a07ceb483a0bf5
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Oct 4 21:41:46 2013 +0200
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
(cherry picked from commit 3435d017e27755353123ca8f65bfe3c051102b48)
Signed-off-by: Emmanuele Bassi <ebassi gnome org>
clutter/clutter-table-layout.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter-table-layout.c b/clutter/clutter-table-layout.c
index 0f5b241..2c9a28c 100644
--- a/clutter/clutter-table-layout.c
+++ b/clutter/clutter-table-layout.c
@@ -889,8 +889,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)
{
@@ -1179,8 +1179,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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]