2003/12/29 22:13:16
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:43:43 +0000 (07:43 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:43:43 +0000 (07:43 +0000)
darcs-hash:20040130074343-2ba56-5395a90cdbb85b61a9179faf1be9fb20033f1e0c.gz

src/org/xwt/Box.java

index 13717cf..6f0c92c 100644 (file)
@@ -302,7 +302,8 @@ public final class Box extends JSScope implements Scheduler.Task {
             int increment = max(1, x_slack / cols);
             startslack = x_slack;
             for(short col=0; col < cols; col++) {
-                int diff = min(colMaxWidth[col], colWidth[col] + increment) - colWidth[col];
+                // FIXME: double check this
+                int diff = min(min(colMaxWidth[col], colWidth[col] + increment) - colWidth[col], x_slack);
                 x_slack -= diff;
                 colWidth[col] += diff;
             }