Community
Participate
Working Groups
I observed this in a workbench where default fontsize was 9 and the dialog fontsize was changed to a greater value. In this situation the mentioned label in any OSGi-based launch configuration would be truncated like "Enable OT/Equino". Interestingly this truncation does not apply to the label "Enable OTRE" shown in non-OSGi launches, although both checkboxes/labels are created by the exact same code.
Created attachment 196379 [details] fix Confusion was caused by the fact that we are adapting base classes from debug.ui and pde.ui, class LaunchConfigurationTabGroupViewer has a two phase init: The constructor via createControl initializes the CTabFolder and already applies the configured dialog font. Only in phase two the individual pages are created into the fully configured parent. In debug.ui-land it seems all intermediate children of the CTabFolder consistently pass the parent font down the line. In pde.ui-land class MainTab creates an intermediate Composite of which it fails to set the font before creating individual blocks into it. This is where our checkbox was added, so that at creation type it had wrong font size causing a wrong widthHint to be computed. To add insult to injury, both camps have slighlty different copies of a class called SWTFactory. The very first difference is: public static int getButtonWidthHint(Button button) { - /*button.setFont(JFaceResources.getDialogFont());*/ + button.setFont(JFaceResources.getDialogFont()); PixelConverter converter= new PixelConverter(button); int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); } pde.ui uses the first line to compensate the missing font propagation, whereas debug.ui doesn't need it. Weird, I'd say. Long story short: the patch fixes this inconsistency by searching for the CTabFolder ancestor and applying its font to our "Object Teams Runtime" group before creating the checkbox.
Patch was committed as r1623.
Verified using build 201105311237