]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixed bug (mixing width and height)
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 22 Oct 2008 12:19:33 +0000 (12:19 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 22 Oct 2008 12:19:33 +0000 (12:19 +0000)
svn changeset:5694/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java

index b0ef5c08370739564969c3795f66b51824335113..f27630aa8c83331f722991ba0b870501f1f431f5 100644 (file)
@@ -460,13 +460,19 @@ public class IPanel extends SimplePanel implements Container,
 
         if (width != null && !width.equals("")) {
             w = getOffsetWidth() - getContainerBorderWidth();
+            if (w < 0) {
+                w = 0;
+            }
         }
 
         if (height != null && !height.equals("")) {
-            w = getOffsetHeight() - getContainerBorderHeight();
+            h = contentNode.getOffsetHeight() - getContainerBorderHeight();
+            if (h < 0) {
+                h = 0;
+            }
         }
 
-        return new RenderSpace(w, h);
+        return new RenderSpace(w, h, true);
     }
 
     public boolean requestLayout(Set<Paintable> child) {