Bug 13899

Summary: Incorrect Disabled Image is Created in High Contrast Mode
Product: [Eclipse Project] Platform Reporter: Naomi Miyamoto <nmiya>
Component: SWTAssignee: Silenio Quarti <Silenio_Quarti>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: Mike_Wilson
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Naomi Miyamoto CLA 2002-04-16 11:30:32 EDT
When Display setting is High Contrast Mode #1 (button background color is 
black), background color of disabled image created with SWT.IMAGE_DISABLE flag 
is not black but gray.

This pseud code works well except when SWT.COLOR_WIDGET_BACKGROUND is black. 

Image createDisabledImage(Point size, Point pos, String displayText) {
    Image image = new Image(display, size.x, size.y);
    gc = new GC(image);
    gc.setFont(font);
    gc.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
    gc.setForeground(display.getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));
    gc.fillRectangle(0, 0, size.x, size.y);
    gc.drawText(displayText, pos.x, pos.y);
    gc.dispose();
    Image disabledImage = new Image(display, image, SWT.IMAGE_DISABLE);
    image.dispose();
    return disabledImage;
}
Comment 1 Mike Wilson CLA 2008-04-12 15:50:51 EDT
Closing for lack of activity. Please re-open if this is still an issue on current reference platforms.

Comment 2 Eclipse Webmaster CLA 2019-09-06 16:06:46 EDT
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.