partly revert my recent expanding change to not expand the table if all

Wed Feb 13 06:42:37 2002  Tim Janik  <timj@gtk.org>

        * gtk/gtktable.c (gtk_table_size_allocate_pass1): partly revert
        my recent expanding change to not expand the table if all children
        have not epxand behaviour. this fixes palette views which often
        use homogeneous non-expanding tables.
This commit is contained in:
Tim Janik
2002-02-13 05:48:56 +00:00
committed by Tim Janik
parent a9a06ee44e
commit aa18bbf0ed
8 changed files with 97 additions and 19 deletions

View File

@ -1,3 +1,10 @@
Wed Feb 13 06:42:37 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): partly revert
my recent expanding change to not expand the table if all children
have not epxand behaviour. this fixes palette views which often
use homogeneous non-expanding tables.
Tue Feb 12 14:27:41 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted): emit

View File

@ -1,3 +1,10 @@
Wed Feb 13 06:42:37 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): partly revert
my recent expanding change to not expand the table if all children
have not epxand behaviour. this fixes palette views which often
use homogeneous non-expanding tables.
Tue Feb 12 14:27:41 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted): emit

View File

@ -1,3 +1,10 @@
Wed Feb 13 06:42:37 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): partly revert
my recent expanding change to not expand the table if all children
have not epxand behaviour. this fixes palette views which often
use homogeneous non-expanding tables.
Tue Feb 12 14:27:41 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted): emit

View File

@ -1,3 +1,10 @@
Wed Feb 13 06:42:37 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): partly revert
my recent expanding change to not expand the table if all children
have not epxand behaviour. this fixes palette views which often
use homogeneous non-expanding tables.
Tue Feb 12 14:27:41 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted): emit

View File

@ -1,3 +1,10 @@
Wed Feb 13 06:42:37 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): partly revert
my recent expanding change to not expand the table if all children
have not epxand behaviour. this fixes palette views which often
use homogeneous non-expanding tables.
Tue Feb 12 14:27:41 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted): emit

View File

@ -1,3 +1,10 @@
Wed Feb 13 06:42:37 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): partly revert
my recent expanding change to not expand the table if all children
have not epxand behaviour. this fixes palette views which often
use homogeneous non-expanding tables.
Tue Feb 12 14:27:41 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted): emit

View File

@ -1,3 +1,10 @@
Wed Feb 13 06:42:37 2002 Tim Janik <timj@gtk.org>
* gtk/gtktable.c (gtk_table_size_allocate_pass1): partly revert
my recent expanding change to not expand the table if all children
have not epxand behaviour. this fixes palette views which often
use homogeneous non-expanding tables.
Tue Feb 12 14:27:41 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted): emit

View File

@ -1334,9 +1334,22 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
real_height = GTK_WIDGET (table)->allocation.height - GTK_CONTAINER (table)->border_width * 2;
if (table->homogeneous)
{
if (!table->children)
nexpand = 1;
else
{
nexpand = 0;
for (col = 0; col < table->ncols; col++)
if (table->cols[col].expand)
{
nexpand += 1;
break;
}
}
if (nexpand)
{
width = real_width;
for (col = 0; col + 1 < table->ncols; col++)
width -= table->cols[col].spacing;
@ -1347,6 +1360,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
width -= extra;
}
}
}
else
{
width = 0;
@ -1411,6 +1425,20 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
}
if (table->homogeneous)
{
if (!table->children)
nexpand = 1;
else
{
nexpand = 0;
for (row = 0; row < table->nrows; row++)
if (table->rows[row].expand)
{
nexpand += 1;
break;
}
}
if (nexpand)
{
height = real_height;
@ -1425,6 +1453,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
height -= extra;
}
}
}
else
{
height = 0;