From: Matti Tahvonen Date: Wed, 22 Oct 2008 12:19:33 +0000 (+0000) Subject: fixed bug (mixing width and height) X-Git-Tag: 6.7.0.beta1~3954 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=51ccaaa4cdcc9a4c6653ed08da9b56cbd5053fec;p=vaadin-framework.git fixed bug (mixing width and height) svn changeset:5694/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java index b0ef5c0837..f27630aa8c 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java @@ -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 child) {