]> source.dussan.org Git - vaadin-framework.git/commitdiff
IExpandLayout: fixed bottom margin detection
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 21 Nov 2007 12:25:06 +0000 (12:25 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 21 Nov 2007 12:25:06 +0000 (12:25 +0000)
svn changeset:2878/svn branch:trunk

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

index f4e71cfc922f9972f9509a2739b3f6e7b3b01454..05af757c559158079c3b11b2d3dd532f2ac92849 100644 (file)
@@ -426,10 +426,11 @@ public class IExpandLayout extends ComplexPanel implements
 
             int marginTop = DOM.getElementPropertyInt(DOM.getFirstChild(me),
                     "offsetTop")
-                    - DOM.getElementPropertyInt(me, "offsetTop");
+                    - DOM.getElementPropertyInt(element, "offsetTop");
 
             Element lastElement = DOM.getChild(me, (DOM.getChildCount(me) - 1));
             int marginBottom = DOM.getElementPropertyInt(me, "offsetHeight")
+                    + DOM.getElementPropertyInt(me, "offsetTop")
                     - (DOM.getElementPropertyInt(lastElement, "offsetTop") + DOM
                             .getElementPropertyInt(lastElement, "offsetHeight"));
             size -= (marginTop + marginBottom); // FIXME expects same size