Project: Eclipse_Platform_UI
Bug 172087 [Themes] Problems with JFaceColors in High Contrast
Reported: 2007-01-29 18:42:15 | Status: verified fixed

I20070123-1715 I have noticed several problem with JFaceColors in high contrast mode, I will file them all under one bug report since I think they are related. Use the code below inserted into a view to test. Text t1 = new Text(parent, SWT.NULL); t1.setText("A string in active hyperlink color"); t1.setForeground(JFaceColors.getActiveHyperlinkText(parent.getDisplay())); Text t2 = new Text(parent, SWT.NULL); t2.setText("A string in hyperlink color"); t2.setForeground(JFaceColors.getHyperlinkText(parent.getDisplay())); Text t3 = new Text(parent, SWT.NULL); t3.setText("A string in error color"); t3.setForeground(JFaceColors.getErrorText(parent.getDisplay())); Problem 1. Colors do not match those displayed in preferences. Set high contrast mode in XP using settings/control panel/ accessibility Start Eclipse and create a plugin with a view containing the lines above. Start a new runtime workbench Note that the hyper link colors are both shades of blue. (see screenshot). Now open the preference page General/Appearance/Colors and Fonts The hyperlink colors show up as being white. (see screenshot). There is an inconsistency between the preference page which shows a usable color (white) and the results returned from JFaceColors which return hard to read colors. Problem 2. This is closely related to problem 1. Go to the color and fonts preference page again. Change the active hyperlink color (currently showing as white) to green, then press the restore defaults button. The active hyperlink color now shows as being dark blue. I think that I have also seen a bug where the preferences did not persist but I can't reproduce that one so I will leave that out of the scope of this bug report.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingColorRegistry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingFontRegistry.java