Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The selected entry in Eclipse content assist is unreadable because of colours

In my Eclipse installation, the selected entry in the content assist menu is almost unreadable because the colour is white on white-greyish. See image below.

Highlighted entry unreadable

I can change the background and text colour of the non-selected entries in the list from eclipse preferences, but the selected entry is always the same colour and is always unreadable. I use the Eclipse Color Theme RecognEyes, but that should only affect the editor as far as I understand.

How do I make the text of the selected entry in the context assist menu readable?

Update

After reading m1shk4's answer it does indeed seem that Eclipse takes it's colours from the current gnome theme. However it does this in a kind of weird way.

The background colour of the content assist "window" is the input boxes background colour, and the text colour is the input boxes text colour. This all seems logical.

However the background colour of the selected entry is the windows background colour, but the text of the selected entry is not the background text colour.

See image below for an illustration.

Color mapping from gnome theme to eclipse

Does anybody know how to fix or workaround this issue?

Working workaround

It seems this issue is rather specific with the default gnome theme in Ubuntu. Switching to another gnome theme solves the issue for me.

like image 561
Bjarke Freund-Hansen Avatar asked Jun 21 '11 11:06

Bjarke Freund-Hansen


4 Answers

Not sure if it's still in time but this might help all of you who are having the same problem, as I had:

Create a file ~/.gtkrc-2.0 and add this content to the file:

style "eclipse_fix" 
{ 
base[ACTIVE] = shade(0.7, "#4283d3") 
}

class "GtkTreeView" style "eclipse_fix"

Then just set Unity a new theme (in Configuration > appearance) and set again to the previous theme (Ambiance for instance). That will read the new file created above and the new color will take effect in eclipse.

like image 96
George W. Condomitti Avatar answered Nov 19 '22 14:11

George W. Condomitti


I'm on Eclipse Neon and using Eclipse Color Themes.

I've solved this issue by:

Window-> Preferences-> General-> Appearance: 
->Uncheck "Use mixed fonts and colors for labels."
like image 27
MFerreira Avatar answered Nov 19 '22 14:11

MFerreira


Windows > Preference > General > Appearance > Color and Fonts

Basic > Content Assist background color, Content Assist foreground color:

Preference

and voilà!

Content Assist

like image 7
Mia Avatar answered Nov 19 '22 16:11

Mia


Update screenshot

Interface is in Russian, but I think it's clear that colors, you're looking for, correspond to Selected Items entry. On my screenshot its light-blue for background and black for foreground.

like image 5
Mykhailo Gaidai Avatar answered Nov 19 '22 14:11

Mykhailo Gaidai