Community
Participate
Working Groups
SWT-win32, v3223 [Windows Classic Theme with manifest] Table check boxes should have a shade when the row they are in is selected. See attachment 34240 [details] (right). In order for this to work, the transparency fix from bug 125255 needs to be ported to the table widget. Test case: --- import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class CheckTableTest { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Table tbl = new Table(shell, SWT.BORDER | SWT.CHECK | SWT.FULL_SELECTION); for (int idx = 0; idx < 10; idx++) { new TableItem(tbl, SWT.NONE).setText("Item " + idx); } shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
Created attachment 34477 [details] Patch
FH, any reason we didn't fix table too? I thought we had determined that the fix was not necessary.
FH, was the fix necessary?
Hi Florian, I believe we should not have the shade inside the box mark. In Tree, we used to have the shade inside the mark box and we had the changed it cause it was hard to see the check mark (bug 125255).
These are two different things. Bug 125255 was about the tree selection bar "showing through", making the check box contents hard to see. In contrast, this bug requests that table check boxes have their native shade. This shade is supplied by Windows so you can better identify the check box belonging to the current row selection. It doesn't make the check mark hard to see. See msconfig.exe->Services for an example of how it's supposed to look. The reason, however, that this shade is currently missing is exactly the same as in bug 125255; incorrectly set transparency. So the patch is still needed. I've added an if clause so it would work even for a red table background.
Yes, I understand the problem and I know the code you wrote is right. The only thing I'm not sure is "It doesn't make the check mark hard to see." part. In Tree people complained it was hard to read, why the same behaviour in Table would be okay. Steve, what do you thing ? Florian's code works fine, and the clause 'if red switch to green' should be port to Tree I think.
> The only thing I'm not sure is "It doesn't make the check mark hard to see." > part. In Tree people complained it was hard to read, why the same behaviour > in Table would be okay. The colour of the check box shade is different from the selection bar colour. (133, 146, 181) vs. (10, 36, 106), assuming the default colours are used.
Created attachment 37953 [details] Screenshot Here's another screenshot to make this clearer. 1st row: Tree selection bar appearing behind check mark -> BAD: Hard to see (but fixed now) 2nd row: Classic Theme table check boxes Left: without shade, Right: with shade (expected look) -> Easy to see (native behaviour) 3rd row: XP Theme table check boxes Left: without shade, Right: with shade (already works)
fixed in HEAD > 20060418