always spread out the extra space allocated for the homogeneous case, as

Tue Feb 12 02:19:49 2002  Tim Janik  <timj@gtk.org>

        * gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
        the extra space allocated for the homogeneous case, as we don't
        properly deal with readjusting table allocation within it. (for  this
        purpose, a GtkAlignment can be used as table parent).
This commit is contained in:
Tim Janik 2002-02-12 01:39:28 +00:00 committed by Tim Janik
parent c823b8f6fd
commit 1cc88c4cf8
8 changed files with 66 additions and 39 deletions

View File

@ -1,3 +1,10 @@
Tue Feb 12 02:19:49 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
the extra space allocated for the homogeneous case, as we don't
properly deal with readjusting table allocation within it. (for this
purpose, a GtkAlignment can be used as table parent).
2002-02-11 Darin Adler <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed): * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):

View File

@ -1,3 +1,10 @@
Tue Feb 12 02:19:49 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
the extra space allocated for the homogeneous case, as we don't
properly deal with readjusting table allocation within it. (for this
purpose, a GtkAlignment can be used as table parent).
2002-02-11 Darin Adler <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed): * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):

View File

@ -1,3 +1,10 @@
Tue Feb 12 02:19:49 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
the extra space allocated for the homogeneous case, as we don't
properly deal with readjusting table allocation within it. (for this
purpose, a GtkAlignment can be used as table parent).
2002-02-11 Darin Adler <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed): * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):

View File

@ -1,3 +1,10 @@
Tue Feb 12 02:19:49 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
the extra space allocated for the homogeneous case, as we don't
properly deal with readjusting table allocation within it. (for this
purpose, a GtkAlignment can be used as table parent).
2002-02-11 Darin Adler <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed): * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):

View File

@ -1,3 +1,10 @@
Tue Feb 12 02:19:49 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
the extra space allocated for the homogeneous case, as we don't
properly deal with readjusting table allocation within it. (for this
purpose, a GtkAlignment can be used as table parent).
2002-02-11 Darin Adler <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed): * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):

View File

@ -1,3 +1,10 @@
Tue Feb 12 02:19:49 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
the extra space allocated for the homogeneous case, as we don't
properly deal with readjusting table allocation within it. (for this
purpose, a GtkAlignment can be used as table parent).
2002-02-11 Darin Adler <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed): * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):

View File

@ -1,3 +1,10 @@
Tue Feb 12 02:19:49 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): always spread out
the extra space allocated for the homogeneous case, as we don't
properly deal with readjusting table allocation within it. (for this
purpose, a GtkAlignment can be used as table parent).
2002-02-11 Darin Adler <darin@bentspoon.com> 2002-02-11 Darin Adler <darin@bentspoon.com>
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed): * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):

View File

@ -1335,27 +1335,16 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
if (table->homogeneous) if (table->homogeneous)
{ {
nexpand = 0; width = real_width;
for (col = 0; col < table->ncols; col++)
if (table->cols[col].expand)
{
nexpand += 1;
break;
}
if (nexpand > 0) for (col = 0; col + 1 < table->ncols; col++)
width -= table->cols[col].spacing;
for (col = 0; col < table->ncols; col++)
{ {
width = real_width; extra = width / (table->ncols - col);
table->cols[col].allocation = MAX (1, extra);
for (col = 0; col + 1 < table->ncols; col++) width -= extra;
width -= table->cols[col].spacing;
for (col = 0; col < table->ncols; col++)
{
extra = width / (table->ncols - col);
table->cols[col].allocation = MAX (1, extra);
width -= extra;
}
} }
} }
else else
@ -1423,28 +1412,17 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
if (table->homogeneous) if (table->homogeneous)
{ {
nexpand = 0; height = real_height;
for (row = 0; row < table->nrows; row++)
if (table->rows[row].expand)
{
nexpand += 1;
break;
}
if (nexpand > 0) for (row = 0; row + 1 < table->nrows; row++)
height -= table->rows[row].spacing;
for (row = 0; row < table->nrows; row++)
{ {
height = real_height; extra = height / (table->nrows - row);
table->rows[row].allocation = MAX (1, extra);
for (row = 0; row + 1 < table->nrows; row++) height -= extra;
height -= table->rows[row].spacing;
for (row = 0; row < table->nrows; row++)
{
extra = height / (table->nrows - row);
table->rows[row].allocation = MAX (1, extra);
height -= extra;
}
} }
} }
else else