From: megacz Date: Fri, 30 Jan 2004 07:39:26 +0000 (+0000) Subject: 2003/10/16 09:35:55 X-Git-Tag: RC3~470 X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=e3ab0c9f1105faf5d28002caf095937a2850a60a 2003/10/16 09:35:55 darcs-hash:20040130073926-2ba56-b6343ba3955709ea15dba9fb1f40655c8821f677.gz --- diff --git a/src/org/xwt/Box.java.pp b/src/org/xwt/Box.java.pp index 429c7a4..e6c7201 100644 --- a/src/org/xwt/Box.java.pp +++ b/src/org/xwt/Box.java.pp @@ -209,10 +209,16 @@ public final class Box extends JS.Scope { // Reflow //////////////////////////////////////////////////////////////////////////////////////// + /** only for use on the root box */ void reflow() { reflow(width, height); } void reflow(int new_width, int new_height) { repack(); if (Surface.abort) return; + //#repeat width/height new_width/new_height HSHRINK_FLAG/VSHRINK_FLAG contentwidth/contentheight minwidth/minheight maxwidth/maxheight + new_width = bound(max(contentwidth, minwidth), + new_width, + ((flags & HSHRINK_FLAG) != 0) ? max(contentwidth, minwidth) : maxwidth); + //#end resize(x, y, new_width, new_height); } @@ -263,8 +269,8 @@ public final class Box extends JS.Scope { // --- Phase 2 ---------------------------------------------------------------------- // compute the min/max sizes of the columns and rows and set our contentwidth + //#repeat x/y y/x width/height col/row cols/rows colspan/rowspan colWidth/rowHeight maxwidth/maxheight minwidth/minheight contentwidth/contentheight colMaxWidth/rowMaxHeight numCols/numRows if (numChildren() != 0) { - //#repeat x/y y/x width/height col/row cols/rows colspan/rowspan colWidth/rowHeight maxwidth/maxheight minwidth/minheight contentwidth/contentheight colMaxWidth/rowMaxHeight numCols/numRows int numCols = cols; if (numCols == 0) for(Box child = getChild(0); child != null; child = child.nextSibling()) @@ -274,10 +280,10 @@ public final class Box extends JS.Scope { if (!(((child.flags & NOTPACKED_FLAG) != 0) || ((child.flags & INVISIBLE_FLAG) != 0))) colWidth[child.col] = max(colWidth[child.col], child.contentwidth / child.colspan); for(int col=0; col