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
menuHyperlink.setVisible(!menuManager.isEmpty()
						&& titleLabel.getVisible());
				if (menuHyperlink.getVisible())
					msize = menuHyperlink.computeSize(SWT.DEFAULT, SWT.DEFAULT);
			}
			if (flushCache)
				titleCache.flush();
			titleCache.setControl(titleLabel);
			int twidth = iwidth == SWT.DEFAULT ? iwidth : iwidth - SPACING * 2;
			if (bsize != null && twidth != SWT.DEFAULT)
				twidth -= bsize.x + SPACING;
			if (msize != null && twidth != SWT.DEFAULT)
				twidth -= msize.x + SPACING;
			if (titleLabel.getVisible()) {
				tsize = titleCache.computeSize(twidth, SWT.DEFAULT);
				if (twidth != SWT.DEFAULT) {
					
					
					
					int maxWidth = titleCache.computeSize(SWT.DEFAULT,
							SWT.DEFAULT).x;
					tsize.x = Math.min(tsize.x, maxWidth);
					
					
				}
			} else
				tsize = new Point(0, 0);
			Point size = new Point(width, height);
			if (!move) {