Project: Eclipse_Platform_UI
Bug 219946 [TabbedProperties] Tabbed property sheet tab titles can get truncated when selected
Reported: 2008-02-22 07:58:00 | Status: resolved fixed

Build ID: M20070921-1145 Steps To Reproduce: 1.Contribute property tabs with labels that are similar lengths (but slightly different, say 2 or 3 characters) 2.Provide 16x16 pixel icons for the tabs. 3.When selected the label text tabs that are slightly longer is truncated because not enough room for the text and icon was allowed in the first place. More information: I have tracked this bug down to org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList.setElements(). When it attempts to calculate the widest tab title item, it calculates the width of each tab title in turn and if the title has an icon it adds 16+5 pixels to the width. However, when checking this width against the current widest item, it only compares with the TEXT width of the current widest item. Therefore, unless the widest tab title text isn't at least 16+5 pixels wider than any other title text, it may not be considered to be the widest item. When checking if item is wider than current widest item, the code should take into account whether the current widest item has an icon and act accordingly. Regards Sid

Files changed in fix:
bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyList.java