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
*/
	public TrimmedPartLayout(Composite parent) {
		clientArea = new Composite(parent, SWT.NONE);
		clientArea.setLayout(new FillLayout());
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.swt.widgets.Layout#computeSize(org.eclipse.swt.widgets.Composite
	 * , int, int, boolean)
	 */
	protected Point computeSize(Composite composite, int wHint, int hHint,
			boolean flushCache) {
		
		return new Point(SWT.DEFAULT, SWT.DEFAULT);
	}
	protected void layout(Composite composite, boolean flushCache) {
		if (composite.isDisposed() || clientArea.isDisposed()) {
			return;
		}
		composite.setRedraw(false);
		try {
			Rectangle ca = composite.getClientArea();
			Rectangle caRect = new Rectangle(ca.x, ca.y, ca.width, ca.height);
			
			if (top != null) {
				Point topSize = top
						.computeSize(caRect.width, SWT.DEFAULT, true);
				caRect.y += topSize.y;