]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed ScrollTable relative height calculation
authorArtur Signell <artur.signell@itmill.com>
Wed, 1 Oct 2008 12:32:42 +0000 (12:32 +0000)
committerArtur Signell <artur.signell@itmill.com>
Wed, 1 Oct 2008 12:32:42 +0000 (12:32 +0000)
svn changeset:5579/svn branch:trunk

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

index 3a3c509e095343f60e4ec4c1b55a32fce5b52aa6..0d0f224fe8925637d2a3000f354d17f4cddecde7 100644 (file)
@@ -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;
             }