From 3b6ae7427c2b803a89be4bf94771f3b79380c099 Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Mon, 10 Dec 2007 10:23:02 +0000 Subject: [PATCH] Quick-fix for BETA release. Now layouts without size work more reliably. svn changeset:3198/svn branch:trunk --- .../toolkit/terminal/gwt/client/ui/IOrderedLayout.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java index 6d7edeaf74..275a121fec 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java @@ -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 = "
"; + private static final String structure = "
"; 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 -- 2.39.5