Bug 178534 [Forms] Expandable Composite right margin computation bug
Build ID: I20070222-0951 Steps To Reproduce: 1.Make a form with a section 2.Add controls to the form More information: I noticed there was (marginWidth + thmargin) less to what should be the section's client width. I compared what i get to the screen shots in "UI Forms enhancements in release 3.3" (yes i did that! :)) and found that i add a two big margin on the right. I debugged the private layout of ExpandableComposite and i found that at line 332 (in release 3.3M5) int areaWidth = clientArea.width - marginWidth - marginWidth - thmargin - thmargin; int cx = marginWidth + thmargin; if ((expansionStyle & CLIENT_INDENT) != 0) { cx = x; areaWidth -= x; } But when that is called x equals to (marginWidth + thmargin) so after that areaWidth equals to clientArea.width - 3*marginWidth - 3*thmargin. Is that a bug or a feature ? If it is a bug then i propose the following: int areaWidth = clientArea.width - marginWidth - thmargin; int cx = marginWidth + thmargin; if ((expansionStyle & CLIENT_INDENT) != 0) { cx = x; } areaWidth -= cx;
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
}
	/**
	 * Sets the fonts of all the custom controls in the expandable.
	 */
	public void setFont(Font font) {
		super.setFont(font);
		if (textLabel != null)
			textLabel.setFont(font);
		if (toggle != null)
			toggle.setFont(font);
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.swt.widgets.Control#setEnabled(boolean)
	 */
	public void setEnabled(boolean enabled) {
		if (textLabel != null)
			textLabel.setEnabled(enabled);
		if (toggle != null)
			toggle.setEnabled(enabled);
		super.setEnabled(enabled);
	}
	/**
	 * Sets the client of this expandable composite. The client must not be
	 * <samp>null </samp> and must be a direct child of this container.
	 * 
	 * @param client
	 *            the client that will be expanded or collapsed
	 */