From: Artur Signell Date: Wed, 1 Oct 2008 12:32:42 +0000 (+0000) Subject: Fixed ScrollTable relative height calculation X-Git-Tag: 6.7.0.beta1~4038 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b4a45bddbc3e5471f8eff82313e34293fcc673a9;p=vaadin-framework.git Fixed ScrollTable relative height calculation svn changeset:5579/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java index 3a3c509e09..0d0f224fe8 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java @@ -707,7 +707,7 @@ public class IScrollTable extends Composite implements Table, ScrollListener, public void iLayout() { if (height != null) { - if (height.equals("100%")) { + if (height.contains("%")) { /* * We define height in pixels with 100% not to include borders * which is what users usually want. So recalculate pixels via @@ -2326,20 +2326,13 @@ public class IScrollTable extends Composite implements Table, ScrollListener, float relativeHeight = Util.parseRelativeSize(height); if (relativeHeight >= 0) { final int borders = getBorderSpace(); - ApplicationConnection.getConsole().log("Table borders: " + borders); Size available = Util.getLayout(this).getAllocatedSpace(this); - ApplicationConnection.getConsole().log( - "Table available space: " + available); int actual = available.getHeight(); - ApplicationConnection.getConsole().log("actual 1: " + actual); actual -= borders; - ApplicationConnection.getConsole().log("actual 2: " + actual); actual *= relativeHeight / 100.0; - ApplicationConnection.getConsole().log( - "Table height: " + actual + "px"); if (actual < 0) { actual = 0; }