Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
569 views
in Technique[技术] by (71.8m points)

colors - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...