Project: Eclipse_Platform_UI
Bug 210101 [Forms] Large images does not appear as the should in FormHeading
Reported: 2007-11-16 09:32:20 | Status: resolved fixed

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);

Files changed in fix:
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TitleRegion.java