summaryrefslogtreecommitdiff
path: root/gtk/gtktable.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>1998-02-03 05:23:03 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-02-03 05:23:03 +0000
commitfebe6498f2814ddf853bb8c6812c56f5db36dd9c (patch)
treeda60a446704b15e99ddc23660667fd8c2f8cb7bd /gtk/gtktable.c
parentfc86f630a6ef708fab60d5f61c538eef13580bb4 (diff)
downloadgdk-pixbuf-febe6498f2814ddf853bb8c6812c56f5db36dd9c.tar.gz
Fixed (?) problem with arithmentic exceptions in row/column
spanned tables.
Diffstat (limited to 'gtk/gtktable.c')
-rw-r--r--gtk/gtktable.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gtk/gtktable.c b/gtk/gtktable.c
index e24f62252..85cd80606 100644
--- a/gtk/gtktable.c
+++ b/gtk/gtktable.c
@@ -717,11 +717,8 @@ gtk_table_size_request_pass3 (GtkTable *table)
for (col = child->left_attach; col < child->right_attach; col++)
{
- extra = width / (child->right_attach - child->left_attach - col);
- if ((col + 1) < child->right_attach)
- table->cols[col].requisition += extra;
- else
- table->cols[col].requisition += width;
+ extra = width / (child->right_attach - col);
+ table->cols[col].requisition += extra;
width -= extra;
}
}
@@ -752,11 +749,8 @@ gtk_table_size_request_pass3 (GtkTable *table)
for (row = child->top_attach; row < child->bottom_attach; row++)
{
- extra = height / (child->bottom_attach - child->top_attach - row);
- if ((row + 1) < child->bottom_attach)
- table->rows[row].requisition += extra;
- else
- table->rows[row].requisition += height;
+ extra = height / (child->bottom_attach - row);
+ table->rows[row].requisition += extra;
height -= extra;
}
}