问题描述
首先,已经有,但这些答案没有帮助。
First of all, there is already a similar question, but these answers don't help.
正如本主题中已经提到的, d喜欢在代码辅助中修改非活动行的颜色(不改变其他区域),因为几乎看不到浅灰色背景上的白色。
As already mentioned in the topic, I'd like to modify the color of the inactive line in code assist (without changing other areas) because white on light grey background is hardly seen.
颜色和字体只包含内容辅助前景/背景颜色,这只会改变整个代码辅助的前景/背景,而不是激活或不活动的行。这似乎不是一个选择。有可能以不同的方式改变这种方式,也许是使用某种样式表?
"Colors and fonts" just contain "Content assist foreground/background color", this only changes the foreground/background of the whole code assist but not of the active or inactive line. There doesn't seem to be an option for this. Is it possible to change this in a different way, maybe with some kind of stylesheet?
推荐答案
解决方案。相关的GTK类是GTKTreeView,相应的widget状态是base [ACTIVE]。不幸的是,颜色的变化会影响Eclipse中的其他GTKTreeViews(例如项目浏览器中的树状视图),但对我而言并不重要)。我将列表项的背景颜色设置为十六进制#AAAAAA,所以他们的样子现在有点黑了。我保存了这些设置als .gtkrc-eclipse在我的家庭目录中:
After tinkering around for hours I found the solution. The related GTK class is GTKTreeView, the corresponding widget state is base[ACTIVE]. Unfortunately, a color change will affect other GTKTreeViews in Eclipse too (e.g. the tree view in project explorer, but for me it doesn't matter). I've set the background color of the list items to hex #AAAAAA so their look is a little bit darker now. I saved these settings als .gtkrc-eclipse in my home dir:
style "eclipse" {
font_name = "Sans Condensed 8"
}
style "listitem" {
base[ACTIVE] = "#AAAAAA"
}
class "GtkWidget" style "eclipse"
class "GtkTreeView" style "listitem"
我的Eclipse启动器的命令如下所示:
..and the command of my Eclipse launcher looks like this:
env GTK2_RC_FILES=/usr/share/themes/Ambiance/gtk-2.0/gtkrc:/home/myuser/.gtkrc-eclipse '/opt/eclipse/eclipse'
这篇关于如何修改代码中不活动行的颜色帮助Eclipse?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!