Bug 184345 [Forms] ColumnLayout calculates number of columns incorrectly
In package org.eclipse.ui.forms.widgets, class ColumnLayout, method layout, I believe the number of columns is calculated incorrectly. This can cause the columns to be considerably wider than they should be. The line is: int ncolumns = (carea.width - leftMargin - rightMargin - horizontalSpacing) / (cwidth + horizontalSpacing); I think it should be: int ncolumns = (carea.width - leftMargin - rightMargin + horizontalSpacing) / (cwidth + horizontalSpacing); because the horizontalSpacing is only between columns, and not also on the outsides of the columns. (i.e. There are only ncolumns-1 horizontalSpacing's.) The derivation is: ncolumns * cwidth + (ncolumns-1) * horizontalSpacing = carea.width - leftMargin - rightMargin ==> ncolumns * cwidth + ncolumns * horizontalSpacing = carea.width - leftMargin - rightMargin + horizontalSpacing ==> ncolumns * (cwidth + horizontalSpacing) = carea.width - leftMargin - rightMargin + horizontalSpacing
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ColumnLayout.java
* Horizontal spacing between columns (default is 5).
	 */
	public int horizontalSpacing = 5;
	/**
	 * Vertical spacing between controls (default is 5).
	 */
	public int verticalSpacing = 5;
	/**
	 * Top margin (default is 5).
	 */
	public int topMargin = 5;
	/**
	 * Left margin (default is 5).
	 */
	public int leftMargin = 5;
	/**
	 * Bottom margin (default is 5).
	 */
	public int bottomMargin = 5;
	/**
	 * Right margin (default is 5).
	 */
	public int rightMargin = 5;
	/**
	 * Creates a new instance of the column layout.
	 */
	public ColumnLayout() {
	}
	protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
		if (wHint == 0)