Bug 301895 TrimmedPartLayout miscalculates the left boundary
Build Identifier: UI HEAD, XWT HEAD, on I20100129 TrimmedPartLayout forgets to remove the new offset when calculating the new bounds for left-trim, resulting in the trim being placed under the content. === modified file 'bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/TrimmedPartLayout.java' --- bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/TrimmedPartLayout.java 2010-02-04 18:11:21 +0000 +++ bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/TrimmedPartLayout.java 2010-02-04 22:25:17 +0000 @@ -118,8 +118,8 @@ caRect.width -= leftSize.x; // Don't layout unless we've changed - Rectangle newBounds = new Rectangle(caRect.x, caRect.y, - leftSize.x, caRect.height); + Rectangle newBounds = new Rectangle(caRect.x - leftSize.x, + caRect.y, leftSize.x, caRect.height); if (!newBounds.equals(left.getBounds())) { left.setBounds(newBounds); } @@ -135,8 +135,7 @@ Rectangle newBounds = new Rectangle(caRect.x + caRect.width, caRect.y, rightSize.x, caRect.height); if (!newBounds.equals(right.getBounds())) { - right.setBounds(caRect.x + caRect.width, caRect.y, - rightSize.x, caRect.height); + right.setBounds(newBounds); } } Reproducible: Always
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/TrimmedPartLayout.java
* <li>Top: spans the entire width and abuts the top of the container</li>
 * <li>Bottom: spans the entire width and abuts the bottom of the container</li>
 * <li>Left: spans the space between 'top' and 'bottom' and abuts the left of
 * the container</li>
 * <li>Right: spans the space between 'top' and 'bottom' and abuts the right of
 * the container</li>
 * <li>Center: fills the area remaining once the other controls have been
 * positioned</li>
 * </ol>
 * 
 * <strong>NOTE:</strong> <i>All</i> the child controls must exist. Also,
 * computeSize is not implemented because we expect this to be used in
 * situations (i.e. shells) where the outer bounds are always 'set', not
 * computed. Also, the interior structure of the center may contain overlapping
 * controls so it may not be capable of performing the calculation.
 * 
 * @author emoffatt
 * 
 */
public class TrimmedPartLayout extends Layout {
	public Composite top;
	public Composite bottom;
	public Composite left;
	public Composite right;
	public Composite clientArea;
	/**
	 * This layout is used to support parts that want trim for their containing
	 * composites.
	 * 
	 * @param trimOwner