Bug 4525 - Property viewer doesn't adapt to bg color changes (1FX8XL1)
Summary: Property viewer doesn't adapt to bg color changes (1FX8XL1)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Mike Wilson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:18 EDT by Andre Weinand CLA
Modified: 2002-03-20 14:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Weinand CLA 2001-10-11 14:18:20 EDT
If I change the window's background color in Control Panel/Display/Appearance the Properties viewer doesn't adapt.


NOTES:
	SS (6/28/00 12:27:53 PM)
Confirmed in 033 vaj build. If you have properties displaying, the cells with values have the correct colour.
Only blank cells remain white. The properties Viewwer does nothing to change the colour. Could be the
underlying TableTree. Moving to SWT for comment.

VI (6/28/2000 3:40:53 PM)

The Table cell editors are the wrong colour, the empty columns and rows are the wrong colour and the
parts where the table has been indented are the wrong colour.  I have not touched this stuff so I am not sure
why it is wrong.

The [+]/[-] icon is the wrong colour - this I draw once and re-use so I can understand why it is the wrong colour.

Note: The colour is only mismatched if you change the colours while the application is running.  If you close the application and
reopen, it the colours are correct.

AW (29.06.00 11:11:21)
	The status bar of the properties viewer has the same problem.
	(the JFace statusbar does not!)

CM (2/6/01 1:45:02 PM)
	This PR is very old and may have been fixed since it was entered.
	I changed the window background color with a little TableTree example running,
	and the [+]/[-] icons change colors just fine. (i.e. I did not have to restart).
	Please check with AW to see if this is still a problem in his new world,
	and if so, can he write a little tiny example that shows the problem?
	If it helps any, here is the little TableTree example I was using.

import com.ibm.swt.*;
import com.ibm.swt.graphics.*;
import com.ibm.swt.widgets.*;
import com.ibm.swt.layout.*;
import com.ibm.swt.custom.*;

public class PR_1FX8XL1 {

public static void main (String [] args) {
	Shell shell = new Shell();
	Image image = new Image(null, 20, 20);
	Color red = new Color(null, 255, 0, 0);
	GC gc = new GC(image);
	gc.setBackground(red);
	gc.fillRectangle(image.getBounds());
	gc.dispose();
	red.dispose();
	TableTree tableTree = new TableTree(shell, SWT.BORDER);
	tableTree.setSize(320, 200);
	Table table = tableTree.getTable();
	table.setHeaderVisible(true);
	table.setLinesVisible(true);
	for (int col = 0; col < 3; col++) {
		TableColumn column = new TableColumn(table, SWT.NONE, col);
		column.setText("Column " + col);
		column.setWidth(100);
	}
	for (int iRoot = 0; iRoot < 8; iRoot++) {
		TableTreeItem root = new TableTreeItem(tableTree, SWT.NONE);
		root.setText("Root " + iRoot);
		for (int iBranch = 0; iBranch < 4; iBranch++) {
			TableTreeItem branch = new TableTreeItem(root, SWT.NONE);
			branch.setText("Branch " + iBranch);
			for (int col = 1; col < 3; col++) {
				branch.setImage(col, image);
				branch.setText(col, "R" + iRoot + "B" + iBranch + "C" + col);
			}
			for (int iLeaf = 0; iLeaf < 4; iLeaf++) {
				TableTreeItem leaf = new TableTreeItem(branch, SWT.NONE);
				leaf.setText("Leaf " + iLeaf);
				for (int col = 1; col < 3; col++) {
					leaf.setImage(col, image);
					leaf.setText(col, "R" + iRoot + "B" + iBranch + "L" + iLeaf + "C" + col);
				}
			}
		}
	}
	shell.pack();
	shell.open();
	//tableTree.setEnabled(false);
	Display display = shell.getDisplay ();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch ()) display.sleep ();
	}
}
}

SN (2/6/01 4:50:16 PM)
	The "+" icons are fixed but the "-" icons are not.  Try expanding the tree.

SN (2/6/01 4:54:33 PM)
	No fix at this time.
Comment 1 DJ Houghton CLA 2001-10-29 16:19:27 EST
PRODUCT VERSION:
032 jre

Comment 2 Mike Wilson CLA 2002-03-20 14:37:34 EST
Retested. Both + and - are displayed correctly now.