由于颜色原因,Eclipse 内容辅助中的选定条目不可读 [英] The selected entry in Eclipse content assist is unreadable because of colours

查看:31
本文介绍了由于颜色原因,Eclipse 内容辅助中的选定条目不可读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 Eclipse 安装中,内容辅助菜单中的所选条目几乎无法读取,因为颜色是白灰色的.见下图.

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.

我可以从 eclipse 首选项更改列表中未选中条目的背景和文本颜色,但选中的条目始终是相同的颜色并且始终无法读取.我使用 Eclipse 颜色主题 RecognEyes,但据我所知,这只会影响编辑器.

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.

如何使上下文辅助菜单中所选条目的文本可读?

更新

阅读后 m1shk4 的回答 Eclipse 似乎确实从当前的 gnome 主题中获取了它的颜色.然而,它以一种奇怪的方式做到了这一点.

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.

然而被选中条目的背景颜色是windows的背景颜色,但是被选中条目的文本不是背景文本颜色.

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.

有人知道如何解决或解决此问题吗?

解决方法

这个问题似乎与 Ubuntu 中的默认 gnome 主题有关.切换到另一个 gnome 主题为我解决了这个问题.

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

推荐答案

不确定是否还及时,但这可能会帮助所有遇到同样问题的人,就像我一样:

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

创建一个文件 ~/.gtkrc-2.0 并将此内容添加到文件中:

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"

然后只需为 Unity 设置一个新主题(在配置 > 外观中)并再次设置为之前的主题(例如 Ambiance).这将读取上面创建的新文件,新颜色将在 eclipse 中生效.

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.

这篇关于由于颜色原因,Eclipse 内容辅助中的选定条目不可读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆