Ubuntu 10.04.1 新主题默认所有 Windows 背景颜色设置为黑色。
我不想改变这一点。
在 Eclipse 中,由于 10.04.1,界面没有太大变化 - 除了一件烦人的事情:
当鼠标悬停在关键字(例如变量)上时,该关键字的类型 (...) 将显示在一个小的弹出窗口中。
自 10.04.1 以来的问题是文本为黑色,而背景也是黑色。
有没有办法在 Eclipse 中更改背景颜色?
最佳答案
2018 年 12 月更新:如 howlger 中所述的answer , Eclipse Oxygen 4.7 (June 2017)现在包含一种在弹出窗口中配置背景颜色的方法:
参见“Colors in interactive popups”
Interactive popups like JDT's Quick Outline don't use the platform's tooltip colors any more, since those were sometimes hard to read.
旧样式:
新风格:
- 转到
窗口 > 首选项:常规 > 外观 > 颜色和字体
- 然后更改
基本 > 信息背景
颜色。
在同一个颜色和字体
部分中,您会发现:
<小时/>
Code assist
Basic > Content Assist background color
-> changeBasic > Content Assist foreground color
-> changejava doc
Java > Javadoc background
( overrides default: information background color) -> change
原始答案(2010-2012)
所有各种弹出窗口背景颜色均在 Preferences > Java > Editor
中管理(如 bug 133615 中的完成列表弹出窗口颜色)。
其他背景颜色位于常规>外观>颜色和字体
中(在过滤器字段中输入背景
)。
但是类型弹出窗口似乎坚持系统颜色,这就是您看到黑色背景的原因。
如果确实如此,则值得将其报告为错误。
OP 确认事实并非如此,实际上:
<小时/>It was in
Preferences > C/C++ > Editor > Source hover background
, and had to untick the "System default" (because the shown color was light-gray!)
在 Ubuntu 12.04+ 上,帖子“How to change tooltip background color in Unity?”还提到:
/usr/share/themes/Ambiance/gtk-2.0/gtkrc
最近的帖子(2012 年 12 月)“Eclipse Papercut #10 – Eclipse on Ubuntu: Fixing the black background color in hover ”(来自 Lars Vogel )证实:
The relevant properties are
tooltip_fg_color
andtooltip_bg_color
.
Just search for these values, the position changes sometimes between releases, currently they are at the very top of the file.The following setting uses more reasonable colors.
tooltip_fg_color:#000000
tooltip_bg_color:#f5f5c5
<小时/>
I also had to set the environment variable
SWT_GTK3=0
before starting eclipse to get it working.
关于Eclipse,将鼠标悬停在关键字上时更改弹出文本背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3571850/