From: Joonas Lehtinen Date: Fri, 11 Jul 2008 14:57:54 +0000 (+0000) Subject: Fixes #1938 Changing OrderedLayout vertical from undefined width to pixelwidth does... X-Git-Tag: 6.7.0.beta1~4432 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=383567f5b6c148f2b6a86a1e9a94cc866864548e;p=vaadin-framework.git Fixes #1938 Changing OrderedLayout vertical from undefined width to pixelwidth does not properly cut the width of children svn changeset:5095/svn branch:trunk --- 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 f16f8c6fab..7c49f75b05 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java @@ -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);