]> source.dussan.org Git - vaadin-framework.git/commitdiff
Small fixes to IPanel and ITabsheet layout functions.
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Wed, 21 Nov 2007 12:55:26 +0000 (12:55 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Wed, 21 Nov 2007 12:55:26 +0000 (12:55 +0000)
IExpandLayout cell overflows set to auto.

svn changeset:2880/svn branch:trunk

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

index 05af757c559158079c3b11b2d3dd532f2ac92849..3c678f0eb49f397232f38b7a8cfcc55245663bd8 100644 (file)
@@ -155,7 +155,7 @@ public class IExpandLayout extends ComplexPanel implements
         public VerticalWidgetWrapper() {
             setElement(DOM.createDiv());
             // this is mostly needed for IE, could be isolated
-            DOM.setStyleAttribute(getContainerElement(), "overflow", "hidden");
+            DOM.setStyleAttribute(getContainerElement(), "overflow", "auto");
         }
 
         void setExpandedSize(int pixels) {
index b7e6a9c232dcc7751784a6490124f48ed2d546c9..2dc03d568ca259474d4ba5a37f732a49ce827cce 100644 (file)
@@ -146,7 +146,10 @@ public class IPanel extends SimplePanel implements Paintable,
 
             // Calculate used height
             super.setHeight("");
-            int usedHeight = getOffsetHeight();
+            int usedHeight = DOM.getElementPropertyInt(bottomDecoration,
+                    "offsetTop")
+                    + DOM.getElementPropertyInt(bottomDecoration,
+                            "offsetHeight");
 
             // Calculate content area height (don't allow negative values)
             int h = targetHeight - usedHeight;
index 32cffd766c3cb0c2436f72e9d0bde36d9d9e478d..6eb352b38aef33e084128812bdbae52006e3aebb 100644 (file)
@@ -247,21 +247,13 @@ public class ITabsheet extends FlowPanel implements Paintable,
             DOM.setStyleAttribute(contentNode, "overflow", "hidden");
 
             // Calculate target height
-            int targetHeight = 0;
-            /*
-             * if (height.indexOf("%") > 0) { // Percentage heights are handled
-             * separately int parentHeight = DOM.getElementPropertyInt(DOM
-             * .getParent(getElement()), "offsetHeight"); targetHeight =
-             * parentHeight Integer.parseInt(height.substring(0, height.length() -
-             * 1)) / 100; } else {
-             */
             super.setHeight(height);
-            targetHeight = getOffsetHeight();
-            // }
+            int targetHeight = getOffsetHeight();
 
             // Calculate used height
             super.setHeight("");
-            int usedHeight = getOffsetHeight();
+            int usedHeight = DOM.getElementPropertyInt(deco, "offsetTop")
+                    + DOM.getElementPropertyInt(deco, "offsetHeight");
 
             // Calculate content area height (don't allow negative values)
             int h = targetHeight - usedHeight;