X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FBox.java;fp=src%2Forg%2Fxwt%2FBox.java;h=6f0c92ccdd37b11af6cd414a881e93ee22f0fd61;hb=5df570e09bc14822392040d43c5f8db2cdec63b3;hp=13717cf2852a79aa794133524c30a96b9fb1b29b;hpb=fd4126d20d5d33fb5e122d76616a439f7177cd03;p=org.ibex.core.git diff --git a/src/org/xwt/Box.java b/src/org/xwt/Box.java index 13717cf..6f0c92c 100644 --- a/src/org/xwt/Box.java +++ b/src/org/xwt/Box.java @@ -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; }