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
* separator and description (if present) as well as the client, but will be
	 * in the permanent expanded state and the toggle affordance will not be
	 * shown.
	 * 
	 * @return <samp>true </samp> if the control is fixed in the expanded state,
	 *         <samp>false </samp> if it can be collapsed.
	 */
	protected boolean isFixedStyle() {
		return (expansionStyle & TWISTIE) == 0
				&& (expansionStyle & TREE_NODE) == 0;
	}
	/**
	 * Returns the text client control.
	 * 
	 * @return Returns the text client control if specified, or
	 *         <code>null</code> if not.
	 */
	public Control getTextClient() {
		return textClient;
	}
	/**
	 * Sets the text client control. Text client is a control that is a child of
	 * the expandable composite and is placed to the right of the text. It can
	 * be used to place small image hyperlinks. If more than one control is
	 * needed, use Composite to hold them. Care should be taken that the height
	 * of the control is comparable to the height of the text.
	 * 
	 * @param textClient
	 *            the textClient to set or <code>null</code> if not needed any
	 *            more.