且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何更改 Eclipse 中自动完成框中的突出显示颜色

更新时间:2022-05-24 08:40:31

一定是系统设置,试试Ubuntu控制中心(系统设置)/外观/定制.单击所有选项卡,查看哪种颜色与 eclipse 中的颜色相匹配.

it must be a system setting, try the Ubuntu control center (system settings) / appearance / customize. Click all the tabs and see which color matches the color in eclipse.

更新:我刚刚意识到在 ubuntu 11.04 中出于某种奇怪的原因,自定义颜色的可能性被删除了,您需要更改配置文件

Update: I just realized that in ubuntu 11.04 for some weird reason the possibility to customize the colors was removed, you need to change the config files

sudo vim /usr/share/themes/Ambiance/gtk-2.0/gtkrc 

在我的版本中,第 94 行是

in my version line 94 is

base[ACTIVE]      = shade (0.97, @bg_color)

您需要根据需要进行更改,例如:

which you need to change as you wish, e.g.:

base[ACTIVE]      = shade (0.50, @bg_color)

然后您转到系统设置/外观,将主题更改为某些内容,然后更改回氛围,瞧,事情发生了变化.我只是无法想象为什么没有用于更改此设置的用户界面.

then you go to System settings / appearance, change the theme to something then change back to Ambience and voila, things are changed. I just can't imagine why there is no UI for changing this.

更新 2:这与其他评论者的建议略有相似,只是在不同的文件中.我猜区别是会全局影响系统

Update 2: this is slightly similar to what the other commenter suggested, just in a different file. I guess the difference is that will affect the system globally

更新 2:

在ubuntu 11.10中仍然没有改变主题颜色的GUI,但他们也改变了文件结构所以执行以下命令(同上)

in ubuntu 11.10 there is still no GUI to change the theme colors, but they also changed the file structure so exectute the following command (same as above)

sudo vim /usr/share/themes/Ambiance/gtk-2.0/gtkrc 

并搜索控制工具提示颜色的部分:

and search for this section that controls tooltip colors :

style "tooltips" {
    bg[NORMAL]        = @tooltip_bg_color
    fg[NORMAL]        = @tooltip_fg_color
}

和改变是你想要的,例如:

and alter is as you wish e.g.:

    bg[NORMAL]        = "#000000"
    fg[NORMAL]        = "#FFFFFF"

更新 3:

在 ubuntu 12.04 中,您需要进行更新 1 和更新 2 中描述的更改

In ubuntu 12.04 you need to do both changes described in update 1 and update 2