Minor bug in table layout + fix




Hi,

Minor bug in table layout - for cells that span rows/columns the padding
was forgotten when calculating the requisition.

Patch included (seems to work OK).

Damon



--- gtktable.c.orig Thu Apr  9 15:18:48 1998
+++ gtktable.c Thu Apr  9 15:22:59 1998
@@ -711,9 +711,9 @@
                *  its requisition, then divide up the needed space evenly
                *  amongst the columns it spans.
                */
-              if (width < child->widget->requisition.width)
+              if (width < child->widget->requisition.width +
child->xpadding * 2)
                 {
-                  width = child->widget->requisition.width - width;
+                  width = child->widget->requisition.width +
child->xpadding * 2 - width;

                   for (col = child->left_attach; col < child->right_attach;
col++)
                     {
@@ -743,9 +743,9 @@
                *  its requisition, then divide up the needed space evenly
                *  amongst the columns it spans.
                */
-              if (height < child->widget->requisition.height)
+              if (height < child->widget->requisition.height +
child->ypadding * 2)
                 {
-                  height = child->widget->requisition.height - height;
+                  height = child->widget->requisition.height +
child->ypadding * 2 - height;

                   for (row = child->top_attach; row < child->bottom_attach;
row++)
                     {







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]