本文介绍了如何修改Eclipse中代码辅助中非活动行的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,已经有,但这些答案没有帮助。

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在我的家dir:

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中代码辅助中非活动行的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-02 00:47