Ubuntu 中的 Eclipse:悬停背景颜色属性,在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5380991/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse in Ubuntu: hover background color property, where?
提问by juanmirocks
I changed the background color that is visible when hovering code (to black). For example when you hover over a method, you see its signature in a box; I mean the background color of that box.
我将悬停代码时可见的背景颜色更改为黑色。例如,当您将鼠标悬停在一个方法上时,您会在一个框中看到它的签名;我的意思是那个盒子的背景颜色。
I want to rechange it but I don't find the property anywhere. Do you know which property it is?
我想更换它,但我在任何地方都找不到该物业。你知道它是什么财产吗?
(It should be a global property, because other boxes use the same background color, even the heap status box).
(它应该是一个全局属性,因为其他框使用相同的背景颜色,即使是堆状态框)。
采纳答案by user200340
It might be too late. But I think you need to change this from your OS.
可能为时已晚。但我认为你需要从你的操作系统中改变这一点。
System->Preference->Appearance->Customise->Colors->Tooltips
系统->首选项->外观->自定义->颜色->工具提示
solved my problem.
解决了我的问题。
I am using Ubuntu 10.04.
我正在使用 Ubuntu 10.04。
回答by Phillipus
Preferences -> Java -> Editor -> "Source hover background"?
首选项 -> Java -> 编辑器 -> “源悬停背景”?
Edit: OK, do you mean the tooltip type popup window? The background color of the View to show Javadoc can be set in Preferences "General -> Appearance -> Colrs and Fonts -> Javadoc view background" but if you mean a tooltip type popup then you might have to set this in your OS.
编辑:好的,您是说工具提示类型弹出窗口吗?显示 Javadoc 的视图的背景颜色可以在首选项“常规 -> 外观 -> 颜色和字体 -> Javadoc 视图背景”中设置,但如果您的意思是工具提示类型弹出窗口,那么您可能必须在您的操作系统中设置它。
回答by TikiTavi
In KDE 11.10, System Settings->Application Appearance->Colors(on left)->Colors(tab)->Color Set->Tooltop->Normal Background. Mine was set to black, resulting in black on black in Eclipse.
在 KDE 11.10 中,系统设置->应用程序外观->颜色(左侧)->颜色(选项卡)->颜色设置->工具顶部->普通背景。我的设置为黑色,导致 Eclipse 中的黑底黑字。
回答by Onshop
If you want to change the colour of the hover over for a method that indicates you can click through to its declaration:
如果你想改变一个方法的悬停颜色,表明你可以点击进入它的声明:
Preferences > General > Editors > Text Editors
There is a list of options in 'Appearance Color Options' in the right panel. Select the 'Hyperlink' option and change its colour.
右侧面板的“外观颜色选项”中有一个选项列表。选择“超链接”选项并更改其颜色。
回答by Ilyas Soomro
In ubuntu (software center) find and Install GNOME Color Chooser application and set Tool Tip Background color (yellow). Set foreground color to black if you find color viewing problem on other tooltips.
在 ubuntu(软件中心)中找到并安装 GNOME Color Chooser 应用程序并设置工具提示背景颜色(黄色)。如果您在其他工具提示上发现颜色查看问题,请将前景色设置为黑色。
回答by Nick
Just go to:
只需前往:
Preferences -> Appearance
and choose a Theme other than GTK
并选择 GTK 以外的主题
回答by jmiserez
There is no setting for this within Eclipse that works for all cases. You will have to set this on an OS level as recommended by several other answers and it will vary depending on your OS and desktop environment.
Eclipse 中没有适用于所有情况的设置。您必须按照其他几个答案的建议在操作系统级别进行设置,并且会根据您的操作系统和桌面环境而有所不同。
However, on some versions of Ubuntu (specifically 14.04), none of the methods mentioned in the answers so far work correctly.
但是,在某些版本的 Ubuntu(特别是 14.04)上,到目前为止答案中提到的方法都无法正常工作。
In that case, refer to this this answeron AskUbuntu, which lists the files that need to be edited in order to change the tooltip foreground/background colors to black and white OS wide for the built-in themes. In addition to those, I had to edit one more file (gtk-main.css
).
在这种情况下,请参阅AskUbuntu 上的此答案,其中列出了需要编辑的文件,以便将工具提示前景色/背景色更改为内置主题的黑白操作系统宽度。除此之外,我还得再编辑一个文件 ( gtk-main.css
)。
The files that need to be edited are:
需要编辑的文件有:
/usr/share/themes/Ambiance/gtk-3.0/settings.ini
/usr/share/themes/Ambiance/gtk-3.0/gtk.css
/usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
/usr/share/themes/Ambiance/gtk-2.0/gtkrc
Set all instances of tooltip bg colors to #ffffff
(white) and tooltip bg colors to #000000
or any other color combination you like. If you use the Radiance (light) theme instead of the default Ambiance theme edit the files in the corresponding Radiance folder.
将工具提示背景颜色的所有实例设置为#ffffff
(白色)并将工具提示背景颜色设置为#000000
或您喜欢的任何其他颜色组合。如果您使用 Radiance(光)主题而不是默认的 Ambiance 主题,请编辑相应 Radiance 文件夹中的文件。
回答by Uwe Post
For me, no proposed solution did work. I ended up adding the following to eclipse.ini:
对我来说,没有提出的解决方案有效。我最终将以下内容添加到 eclipse.ini:
--launcher.GTK_version 2
--launcher.GTK_version 2
回答by Mike
Preferences -> General -> Appearance -> Colors and Fonts -> Java -> Colored labels (or anything in here)
首选项 -> 常规 -> 外观 -> 颜色和字体 -> Java -> 彩色标签(或此处的任何内容)