Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329573 - ToolItem's text foreground colour becomes parent's background colour when depressed/clicked on
Summary: ToolItem's text foreground colour becomes parent's background colour when dep...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-05 14:03 EDT by Remy Suen CLA
Modified: 2010-11-05 15:11 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2010-11-05 14:03:50 EDT
Please run the code below. When you click on the item, its text turns white! :O

-----------------

Display display = new Display();
Shell shell = new Shell (display);
shell.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
ToolBar bar = new ToolBar (shell, SWT.BORDER);
for (int i=0; i<2; i++) {
	ToolItem item = new ToolItem (bar, SWT.PUSH);
	item.setText ("Item " + i);
}
bar.pack();
shell.pack();
shell.open();
while (!shell.isDisposed()) {
	if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
Comment 1 Felipe Heidrich CLA 2010-11-05 14:48:46 EDT
I tested on xp, vista, and 7. It only fails on XP.
Comment 2 Felipe Heidrich CLA 2010-11-05 15:09:18 EDT
Okay, please test again. 
a) set the background of the shell in your example to red, the item is still white when pressed
b) run control example, the toolitems are white when pressed
c) to windows explorer and press a toolitem (with text), the text goes white.

bottom: toolitems have white text color when pressed.

agreed ?
Comment 3 Felipe Heidrich CLA 2010-11-05 15:11:35 EDT
closing as wont fix. platform behaviour.