2003/12/10 01:48:53
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:42:43 +0000 (07:42 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:42:43 +0000 (07:42 +0000)
darcs-hash:20040130074243-2ba56-f5886c6941a61a9ac61f59dc711bfa4abb0d4e87.gz

src/org/xwt/Box.java

index 06a5e91..cb9f53a 100644 (file)
@@ -257,7 +257,7 @@ public final class Box extends JSScope {
     
     private void resize(LENGTH x, LENGTH y, LENGTH width, LENGTH height) {
         // FEATURE reimplement, but we're destroying this
-        if (x != this.x || y != this.y || width != this.width || height != this.height) {
+        //if (x != this.x || y != this.y || width != this.width || height != this.height) {
             (parent == null ? this : parent).dirty(this.x, this.y, this.width, this.height);
             boolean sizechange = (this.width != width || this.height != height) && getTrap("SizeChange") != null;
             boolean poschange = (this.x != x || this.y != y) && getTrap("PosChange") != null;
@@ -267,7 +267,7 @@ public final class Box extends JSScope {
                 catch (Exception e) { Log.log(this, e); }
             if (poschange) try { putAndTriggerTraps("PosChange", T); /*Surface.abort = true;*/ }
                 catch (Exception e) { Log.log(this, e); }
-        }
+            //}
     }
 
     private void resize_children() {
@@ -460,8 +460,8 @@ public final class Box extends JSScope {
         case "shrink": put("hshrink", value); put("vshrink", value);
         case "hshrink": CHECKSET_FLAG(HSHRINK); MARK_RESIZE;
         case "vshrink": CHECKSET_FLAG(VSHRINK); MARK_RESIZE;
-        case "width": if (parent==null&&Surface.fromBox(this)!=null) { CHECKSET_INT(width); } else { put("maxwidth", value); put("minwidth", value); MARK_RESIZE; }
-        case "height": if (parent == null&&Surface.fromBox(this)!=null) { CHECKSET_INT(height); } else { put("maxheight", value); put("minheight", value); MARK_RESIZE; }
+        case "width": if (parent==null&&Surface.fromBox(this)!=null) { Surface.fromBox(this).setWidth(toInt(value)); } else { put("maxwidth", value); put("minwidth", value); MARK_RESIZE; }
+        case "height": if (parent == null&&Surface.fromBox(this)!=null) { Surface.fromBox(this).setHeight(toInt(value)); } else { put("maxheight", value); put("minheight", value); MARK_RESIZE; }
         case "maxwidth": CHECKSET_INT(maxwidth); MARK_RESIZE;
         case "minwidth": CHECKSET_INT(minwidth); MARK_RESIZE;
         case "maxheight": CHECKSET_INT(maxheight); MARK_RESIZE;