From 383567f5b6c148f2b6a86a1e9a94cc866864548e Mon Sep 17 00:00:00 2001 From: Joonas Lehtinen Date: Fri, 11 Jul 2008 14:57:54 +0000 Subject: [PATCH] Fixes #1938 Changing OrderedLayout vertical from undefined width to pixelwidth does not properly cut the width of children svn changeset:5095/svn branch:trunk --- .../toolkit/terminal/gwt/client/ui/IOrderedLayout.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 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); -- 2.39.5