summaryrefslogtreecommitdiff
path: root/gtk/gtktable.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-10-08 09:28:00 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-10-08 09:28:00 -0400
commit2e98e37fe49af92b330a1d96cee97108c77b6da9 (patch)
tree6ea9a7ffc47b57ad717a8132f2d25a6c2075fc44 /gtk/gtktable.c
parentf8490e425f2c76533bc1733989d176c8a5ca06f7 (diff)
downloadgtk+-2e98e37fe49af92b330a1d96cee97108c77b6da9.tar.gz
Make GtkTable use gtk_container_handle_border_width
Diffstat (limited to 'gtk/gtktable.c')
-rw-r--r--gtk/gtktable.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/gtk/gtktable.c b/gtk/gtktable.c
index 9a485d164f..5bdbcfabc9 100644
--- a/gtk/gtktable.c
+++ b/gtk/gtktable.c
@@ -140,7 +140,7 @@ gtk_table_class_init (GtkTableClass *class)
container_class->child_type = gtk_table_child_type;
container_class->set_child_property = gtk_table_set_child_property;
container_class->get_child_property = gtk_table_get_child_property;
-
+ gtk_container_class_handle_border_width (container_class);
g_object_class_install_property (gobject_class,
PROP_N_ROWS,
@@ -912,7 +912,6 @@ gtk_table_size_request (GtkWidget *widget,
GtkTable *table = GTK_TABLE (widget);
GtkTablePrivate *priv = table->priv;
gint row, col;
- guint border_width;
requisition->width = 0;
requisition->height = 0;
@@ -932,10 +931,6 @@ gtk_table_size_request (GtkWidget *widget,
requisition->height += priv->rows[row].requisition;
for (row = 0; row + 1 < priv->nrows; row++)
requisition->height += priv->rows[row].spacing;
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (table));
- requisition->width += border_width * 2;
- requisition->height += border_width * 2;
}
static void
@@ -1448,16 +1443,14 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
gint nexpand;
gint nshrink;
gint extra;
- guint border_width;
/* If we were allocated more space than we requested
* then we have to expand any expandable rows and columns
* to fill in the extra space.
*/
gtk_widget_get_allocation (GTK_WIDGET (table), &allocation);
- border_width = gtk_container_get_border_width (GTK_CONTAINER (table));
- real_width = allocation.width - border_width * 2;
- real_height = allocation.height - border_width * 2;
+ real_width = allocation.width;
+ real_height = allocation.height;
if (priv->homogeneous)
{
@@ -1666,15 +1659,13 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
if (gtk_widget_get_visible (child->widget))
{
GtkRequisition child_requisition;
- guint border_width;
gtk_widget_get_preferred_size (child->widget,
&child_requisition, NULL);
gtk_widget_get_allocation (GTK_WIDGET (table), &table_allocation);
- border_width = gtk_container_get_border_width (GTK_CONTAINER (table));
- x = table_allocation.x + border_width;
- y = table_allocation.y + border_width;
+ x = table_allocation.x;
+ y = table_allocation.y;
max_width = 0;
max_height = 0;