Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313139

Summary: [ErrorHandling] High Contrast mode doesn't change the background of an error report dialog
Product: [Eclipse Project] Platform Reporter: Andreas Eminidis <andrease>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: pwebster, Tod_Creasey
Version: 4.0Keywords: accessibility
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard: stalebug
Attachments:
Description Flags
the patch is removing the line where the background color is set none

Description Andreas Eminidis CLA 2010-05-17 10:23:59 EDT
Build Identifier: I20100426-0852

The StyledText inside the error trace dialog appears to be complete white, because the text is in white and so is its background. This is because in the code, a white background is enforced which prevents it to turn black in high contrast mode. To prevent this problem, I propose a potential patch to solve this problem which is attached with this bug report. My proposed solution is to remove the line of code that enforces the background color to be white. This will permit the background color to be changed to the one that Microsoft Windows uses for all of its other windows.

Reproducible: Always

Steps to Reproduce:
1. Change the window settings in Windows so the text will appear in white and background around text would appear in black. This is the "high contrast black" mode in vista and xp.

2. Make the application fail and click details so it will show you the trace.

3. The trace is a StyledText and the text is unreadable
Comment 1 Andreas Eminidis CLA 2010-05-17 10:28:49 EDT
Created attachment 168736 [details]
the patch is removing the line where the background color is set

Another potential solution would be to have a check for high contrast and modify the background color, in that case.
For example:
if (Display.getDefault().getHighContrast()) { 
return Display.getCurrent().getSystemColor( 
SWT.COLOR_WIDGET_BACKGROUND); 
} 
else { 
return Display.getCurrent().getSystemColor(SWT.COLOR.WHITE);
Comment 2 Tod Creasey CLA 2011-05-26 08:58:36 EDT
This is also an issue in 3.6
Comment 3 Lars Vogel CLA 2019-11-14 02:20:49 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.