### Eclipse Workspace Patch 1.0 #P org.eclipse.swt Index: Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java,v retrieving revision 1.34 diff -u -r1.34 RowLayout.java --- Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java 9 May 2006 19:47:04 -0000 1.34 +++ Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java 11 Jan 2007 12:01:34 -0000 @@ -196,12 +196,12 @@ return extent; } -Point computeSize (Control control, boolean flushCache) { +Point computeSize (Control control, boolean flushCache, double totalWidthWeight, double totalHeightWeight, int containerWidth, int containerHeight) { int wHint = SWT.DEFAULT, hHint = SWT.DEFAULT; RowData data = (RowData) control.getLayoutData (); if (data != null) { - wHint = data.width; - hHint = data.height; + wHint = Math.max(data.width, (data.widthWeight > 0)?(int)(totalWidthWeight/data.widthWeight*containerWidth):data.width ); + hHint = Math.max(data.height, (data.heightWeight > 0)?(int)(totalHeightWeight/data.heightWeight*containerHeight):data.height); } return control.computeSize (wHint, hHint, flushCache); } @@ -229,21 +229,30 @@ Point layoutHorizontal (Composite composite, boolean move, boolean wrap, int width, boolean flushCache) { Control [] children = composite.getChildren (); int count = 0; + int totalWidthWeight = 0; + int totalHeightWeight = 0; + for (int i=0; i