Bug 168384 - Problem with grayed disabled button image
Summary: Problem with grayed disabled button image
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-18 01:48 EST by Mohsen Saboorian CLA
Modified: 2007-02-06 17:22 EST (History)
2 users (show)

See Also:


Attachments
image taken from my app with SWT 3.3M4 (2.43 KB, image/png)
2006-12-18 01:50 EST, Mohsen Saboorian CLA
no flags Details
image taken from my app with SWT 3.2 (2.43 KB, image/png)
2006-12-18 01:52 EST, Mohsen Saboorian CLA
no flags Details
the remove (minus) icon, which had problems when made gray (537 bytes, image/png)
2006-12-18 01:55 EST, Mohsen Saboorian CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohsen Saboorian CLA 2006-12-18 01:48:51 EST
SWT 3.3M4 seems to have problems with making button images gray when button is disabled.
I attach here two images, one with SWT 3.3M4 and one with 3.2.1.
Comment 1 Mohsen Saboorian CLA 2006-12-18 01:50:40 EST
Created attachment 55849 [details]
image taken from my app with SWT 3.3M4
Comment 2 Mohsen Saboorian CLA 2006-12-18 01:52:23 EST
Created attachment 55850 [details]
image taken from my app with SWT 3.2
Comment 3 Mohsen Saboorian CLA 2006-12-18 01:55:37 EST
Created attachment 55851 [details]
the remove (minus) icon, which had problems when made gray
Comment 4 Steve Northover CLA 2006-12-18 15:15:42 EST
FH, what kind of image is this?  Does it have alpha?
Comment 5 Felipe Heidrich CLA 2006-12-18 17:00:31 EST
The image is 32bits png bgra.
If have a bug in `new Image(display, image, SWT.IMAGE_DISABLE);`
I think we see this problem now in Button because we changed Button to use ImageList (BCM_SETIMAGELIST).

shell.addListener(SWT.Paint, new Listener() {
	public void handleEvent(Event event) {
		Image image = new Image(display, "D:\\remove16.png");
		Image grayImage = new Image(display, image, SWT.IMAGE_GRAY);
		Image disableImage = new Image(display, image, SWT.IMAGE_DISABLE);
		event.gc.drawImage(image, 70, 410);
		event.gc.drawImage(grayImage, 110, 410);//GOOD
		event.gc.drawImage(disableImage, 150, 410);//BAD
		image.dispose();
		grayImage.dispose();
		disableImage.dispose();
	}
});
Comment 6 Mohsen Saboorian CLA 2007-01-25 03:30:04 EST
Is it to be fixed in upcomming 3.3 M5?
Comment 7 Steve Northover CLA 2007-01-25 09:20:06 EST
SSQ, is FH right?  Is the problem caused by image list or changes to icon graying to support alpha?
Comment 8 Silenio Quarti CLA 2007-01-25 11:02:40 EST
Fixed > 20070125
Comment 9 Mohsen Saboorian CLA 2007-01-26 02:03:32 EST
Thanks.