Bug 210101 [Forms] Large images does not appear as the should in FormHeading
Build ID: M20070921-1145 Steps To Reproduce: 1. Create a new ScrolledForm in a ViewPart 2. use setImage() on the form, make sure the image is larger then the default font height of the heading (19?). I used a 48x48 png image. 3. Run the test application and open the viewPart, the image should know be "clipped" at the top, only revealing the bottom of the image. More information: The layout of the TitleRegion in FormHeading is making an assumption that the font height always is larger then the height of the image. Because of this, large images are position at a negative y-position. This also has impact on the label position. I altered the calculation of the yPos to somtehing like this: int iHeight = getFontHeight(); if (bsize != null) { if (bsize.y > iHeight) { iHeight = bsize.y; } ... busyLabel.setBounds(xloc, yloc + (iHeight - bsize.y) / 2, bsize.x, bsize.y); ... titleLabel.setBounds(xloc, yloc + (iHeight - getFontHeight()) / 2, tw, tsize.y);
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TitleRegion.java
public static final int STATE_NORMAL = 0;
	public static final int STATE_HOVER_LIGHT = 1;
	public static final int STATE_HOVER_FULL = 2;
	private int hoverState;
	private static final int HMARGIN = 1;
	private static final int VMARGIN = 5;
	private static final int SPACING = 5;
	private static final int ARC_WIDTH = 20;
	private static final int ARC_HEIGHT = 20;
	private Image image;
	private BusyIndicator busyLabel;
	private Label titleLabel;
	private SizeCache titleCache;
	private int fontHeight = -1;
	private int fontBaselineHeight = -1;
	private MenuHyperlink menuHyperlink;
	private MenuManager menuManager;
	private boolean dragSupport;
	private int dragOperations;
	private Transfer[] dragTransferTypes;
	private DragSourceListener dragListener;
	private DragSource dragSource;
	private Image dragImage;
	private class HoverListener implements MouseTrackListener,