Community
Participate
Working Groups
Created attachment 258335 [details] Screen Shot showing the colors in CDT The color for background and foreground on the selected item in content assist is not editable. The color choice is very light gray on white. and is nearly unreadable. I tested this in CDT and PDT, both have the same colors. I attempted to apply fixes to /usr/share/themes/Adwaita/gtk-2.0/gtkrc eclipse /home/username/.gtkrc-eclipse (With path change) ====== Adwaita/gtk-2.0/gtkrc ====== style "tooltips" { xthickness = 8 ythickness = 4 bg[NORMAL] = @tooltip_bg_color fg[NORMAL] = @tooltip_fg_color bg[SELECTED] = @tooltip_bg_color } style "eclipse-tooltips" { xthickness = 8 ythickness = 4 bg[NORMAL] = "#313739" #I have tried several combinations, No effect. fg[NORMAL] = "#ededed" bg[SELECTED] = "#313739" } ============================ ====== .gtkrc-eclipse ====== style "eclipse" { font_name = "Sans Condensed 8" } style "listitem" { base[ACTIVE] = "#AAAAAA" } class "GtkWidget" style "eclipse" class "GtkTreeView" style "listitem" ============================ changing content assist colors in ... Preferences > General > Editors > Text Editors Preferences > General > appearance > colors and fonts > basic > Content Assist (changing between black , white, and gray for both with no effect.) I have also tried (changing around several other colors specific to CDT and PDT, with no effect. So i believe it is not a problem with those 2 packages. Even if it was fixable via a gtkrc edit. This needs to be changeable in eclipse via Preferences > General > appearance > colors and fonts > basic > Content Assist
I have the same problem with JSDT Dark theme that I'm doing https://bugs.eclipse.org/bugs/show_bug.cgi?id=486341 It seems that org.eclipse.jface.fieldassist.ContentProposalAdapter and org.eclipse.jface.text.contentassist.ContentAssistant which uses Table to display completion items cannot be customized for background/foreground color. SWT Table doesn't provide a method liek Table#setSelectionBackround, but we can emulate like this: ------------------------------------ final Table table = proposalTable; final Color blue = Display.getCurrent().getSystemColor(SWT.COLOR_BLUE); table.addListener(SWT.EraseItem, new Listener() { @Override public void handleEvent(Event event) { event.detail &= ~SWT.HOT; if ((event.detail & SWT.SELECTED) == 0) return; /* item not selected */ int clientWidth = table.getClientArea().width; GC gc = event.gc; Color oldForeground = gc.getForeground(); Color oldBackground = gc.getBackground(); //gc.setForeground(blue); gc.setBackground(blue); gc.fillRectangle(0, event.y, clientWidth, event.height); gc.setForeground(oldForeground); gc.setBackground(oldBackground); event.detail &= ~SWT.SELECTED; } }); ------------------------------------ It should be very cool if that org.eclipse.jface.fieldassist.ContentProposalAdapter and org.eclipse.jface.text.contentassist.ContentAssistant could provide this feature and Eclispe IDE could style it. IMHO I think dark theme is very important today and we could fix dark theme for completion selection background for the whole dark theme of any editors (JDT, JSDT, etc).
Same problem here on Windows 7 when using Windows' Classic Theme. Works on Aero-Theme. So the problem is related to the colors used by the OS.
Created attachment 273932 [details] selected no focused line in list is unreadable
Same problem here. There is not possible change background color of "no focused selected item" in lists. I didn't find where the color is obtained, on my system this color is #F2F2F2. Problem is not only with content assist, but also with other same types of lists, for example in Preferences: General->Editors->File Associations->File Types Java->Build Path->Classpath Variables->Defined classpath variables etc. If you select item in this lists and move focus out of list, background color is changed to no editable color. Please take note, if focus it gained to list, selected line background is changed to dark color and text is readable.
Same problem on Windows 7 when using Windows' Classic Theme. And also on Windows 7 when using aero theme. but in aero-theme, it's more readable. see attachement
Created attachment 279856 [details] Content assist classic theme
Created attachment 279857 [details] content assist on aero
(In reply to Grégory OLIVER from comment #5) > Same problem on Windows 7 when using Windows' Classic Theme. > And also on Windows 7 when using aero theme. but in aero-theme, it's more > readable. see attachement Eclipse version : Version: 2019-06 (4.12.0) Build id: 20190614-1200
(In reply to Grégory OLIVER from comment #8) > (In reply to Grégory OLIVER from comment #5) > > Same problem on Windows 7 when using Windows' Classic Theme. > > And also on Windows 7 when using aero theme. but in aero-theme, it's more > > readable. see attachement > > Eclipse version : > Version: 2019-06 (4.12.0) > Build id: 20190614-1200 Did you try with the Eclipse Dark Theme?