]> source.dussan.org Git - vaadin-framework.git/commitdiff
Quick-fix for BETA release. Now layouts without size work more reliably.
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 10 Dec 2007 10:23:02 +0000 (10:23 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 10 Dec 2007 10:23:02 +0000 (10:23 +0000)
svn changeset:3198/svn branch:trunk

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

index 6d7edeaf74e3eed8251aa778b3b69d9e73bdaf7b..275a121fec8da9b8614fc26b61b27e972bbfc2ba 100644 (file)
@@ -55,7 +55,7 @@ public abstract class IOrderedLayout extends ComplexPanel implements Container {
     protected Element topMargin = null;
     protected Element bottomMargin = null;
 
-    private static final String structure = "<div><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"table-layout:fixed;\"><tbody></tbody></table></div>";
+    private static final String structure = "<div><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody></tbody></table></div>";
 
     public IOrderedLayout(int orientation) {
         orientationMode = orientation;
@@ -87,22 +87,26 @@ public abstract class IOrderedLayout extends ComplexPanel implements Container {
         }
 
         // Set size
+        // TODO move these to own methods (override setWidth & setHeight)
         if (uidl.hasAttribute("width")) {
             setWidth(uidl.getStringAttribute("width"));
             DOM.setStyleAttribute(DOM.getFirstChild(margin), "width", "100%");
+            DOM.setStyleAttribute(getElement(), "tableLayout", "fixed");
         } else {
             setWidth("");
             DOM.setStyleAttribute(DOM.getFirstChild(margin), "width", "");
+            DOM.setStyleAttribute(getElement(), "tableLayout", "");
         }
         if (uidl.hasAttribute("height")) {
             setHeight(uidl.getStringAttribute("height"));
-            // TODO override setHeight() method and move these there
             DOM.setStyleAttribute(margin, "height", "100%");
             DOM.setStyleAttribute(DOM.getFirstChild(margin), "height", "100%");
+            DOM.setStyleAttribute(getElement(), "tableLayout", "fixed");
         } else {
             setHeight("");
             DOM.setStyleAttribute(margin, "height", "");
             DOM.setStyleAttribute(DOM.getFirstChild(margin), "height", "");
+            DOM.setStyleAttribute(getElement(), "tableLayout", "");
         }
 
         // Update contained components