2003/08/14 05:16:08
[org.ibex.core.git] / src / org / xwt / Box.java.pp
index 822f7a0..8b8e2f8 100644 (file)
@@ -115,8 +115,8 @@ public final class Box extends JS.Scope {
     // computed during reflow
     LENGTH x = 0;
     LENGTH y = 0;
-    LENGTH width = 0;
-    LENGTH height = 0;
+    public LENGTH width = 0;
+    public LENGTH height = 0;
     private int row = 0;  // FIXME short
     private int col = 0;  // FIXME short
     private LENGTH contentwidth = 0;             // == max(minwidth, textwidth, sum(child.contentwidth) + pad)
@@ -1070,9 +1070,7 @@ public final class Box extends JS.Scope {
                     public void put(Box b, Object value) {
                         b.width = stoi(value);
                         if (b.parent == null && b.surface != null) {
-                            // FIXME this gets hosed...
-                            //b.surface.setSize(max(Surface.scarPicture.getWidth(), b.width),
-                            //max(Surface.scarPicture.getHeight(), b.height));
+                            b.surface.setSize();
                             MARK_FOR_REFLOW_b;
                         } else {
                             b.minwidth = b.maxwidth = b.width;
@@ -1288,7 +1286,7 @@ public final class Box extends JS.Scope {
                     public void put(Box b, Object value) {
                         if (b.parent == null && b.surface != null) {
                             b.surface.hscar = stoi(value);
-                            b.surface.dirty(0, 0, b.surface.width, b.surface.height);
+                            b.surface.dirty(0, 0, b.width, b.height);
                             b.surface.Refresh();
                         }
                     }