]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes #1938 Changing OrderedLayout vertical from undefined width to pixelwidth does...
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Fri, 11 Jul 2008 14:57:54 +0000 (14:57 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Fri, 11 Jul 2008 14:57:54 +0000 (14:57 +0000)
svn changeset:5095/svn branch:trunk

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

index f16f8c6fab2a1903fe1ec13036ab68f1f514f1e0..7c49f75b05e38591ff54fd3704aa15d6e68c152e 100644 (file)
@@ -461,8 +461,8 @@ public class IOrderedLayout extends Panel implements Container,
 
     /** Recalculate and apply child widths */
     private void updateChildWidths() {
-        // Horizontal layout is calculated by us
-        if (width != null && orientationMode == ORIENTATION_HORIZONTAL) {
+        // layout is calculated by us
+        if (width != null) {
 
             // Calculate the space for fixed contents minus marginals
             int size;
@@ -493,7 +493,8 @@ public class IOrderedLayout extends Panel implements Container,
 
             // Reduce spacing from the size
             int numChild = childWidgets.size();
-            if (hasComponentSpacing) {
+            if (hasComponentSpacing
+                    && orientationMode == ORIENTATION_HORIZONTAL) {
                 size -= hSpacing * (numChild - 1);
             }
 
@@ -511,7 +512,7 @@ public class IOrderedLayout extends Panel implements Container,
             }
         }
 
-        // Horizontal layout is calculated by the browsers
+        // Layout is calculated by the browsers
         else {
             for (Iterator i = childWidgetWrappers.iterator(); i.hasNext();) {
                 ((WidgetWrapper) i.next()).forceWidth(-1);