Bug 13899 - Incorrect Disabled Image is Created in High Contrast Mode
Summary: Incorrect Disabled Image is Created in High Contrast Mode
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-16 11:30 EDT by Naomi Miyamoto CLA
Modified: 2019-09-06 16:06 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.