Community
Participate
Working Groups
Build Identifier: On GTK, when a Combo has a black foreground (either by explicitly setting the foreground to black, or by using the system default and setting the foreground to null) and a non-white background and the Combo's list is visibile, the list item over which the user is hovering has its foreground set to white. This is not consistent with the behavior of windows. Reproducible: Always Steps to Reproduce: public class GtkComboHoverBackgroundBug { public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(); shell.setLayout(new GridLayout()); final Combo combo = new Combo(shell, SWT.READ_ONLY); combo.setBackground(new Color(display, new RGB(255, 255, 254))); combo.setForeground(new Color(display, new RGB(0, 0, 0))); combo.setItems(new String[] { "0", "1", "2", }); combo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); final Button button = new Button(shell, SWT.TOGGLE); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (button.getSelection()) { combo.setForeground(new Color(display, new RGB(0, 0, 1))); button.setText("Switch to black"); } else { combo.setForeground(null); button.setText("Switch to non-black"); } shell.layout(true, true); } }); button.setText("Switch to non-black"); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } }
Can you attach a screenshot of the windows behaviour ? What do you think is the correct behavior?
More than a month without reply and it is unclear to me what is considered to be the right behaviour in this case. Closing. Please reopen when you have time to help us improve.