Reputation: 46492
My Eclipse javadoc view has a black background which makes it look terrible and partly unreadable (e.g. links are dark blue on black). Even worse, the javadoc popup has black background, too. I can't find the corresponding setting.
The answer by Sumit Singh showed me how to change the background for the javadoc view. However, I still see no way how to change the foreground. Even worse, the javadoc popup background color didn't change.
I don't think it's caused by a plugin, as it happens with a fresh install, too. This happens on Ubuntu 10.4. In Windows the colors can't be changed either, but there are fine.
Upvotes: 57
Views: 35593
Reputation: 91
Had same issue with Neon on Ubuntu 16.04 Mate edition.
To fix it, I have created a small, user-specific GTK3 CSS settings file. It is stored as you HOMEDIR/.config/gtk-3.0/gtk.css
In my case, I compressed the spacing a bit, specified default font and also, set the appearance for the tooltip windows:
#####################
* {
padding: 1px;
font: Liberation Mono 12;
}
GtkToolbar {
padding: 2px;
}
GtkMenuBar {
padding: 2px;
}
GtkMenuItem {
padding: 2px 6px;
}
.tooltip {
background-color: #CAE1FF;
color: #EEEEEE;
text-shadow: none;
}
#########################
Upvotes: 5
Reputation: 6512
Please note, this issue has been resolved in Eclipse as of 8th November 2016.
To have this fixed, please download one of the latest integration builds:
http://download.eclipse.org/eclipse/downloads/
(The maintenance builds don't have the patch at the time of writing 2016-11Nov-09Wed).
I wrote a patch that introduced a new preference in Eclipse "Information Background/Text" under General -> Appearance -> Colors and Fonts.
This preference generates the correct color on Linux/Gtk (White background, black text).
See:
Bug 505738 – Define a information hover color which JDT, CDT or others can use
https://bugs.eclipse.org/bugs/show_bug.cgi?id=505738
Subsequently I made Javadoc colors inherit it's color from that preference. See:
Bug 501742 – Default Javadoc text and background color should use colors consistent with Java editor background/foreground.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=501742
As an added bonus, it also works on the Dark Theme:
Bug 505851 – [Dark Theme] Style the HOVER_ colors for the dark theme
https://bugs.eclipse.org/bugs/show_bug.cgi?id=505851
Upvotes: 3
Reputation: 4600
None of the answers here worked for me (I have Eclipse Mars and Ubuntu 14.04). I had to edit /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
. I've changed tooltip_bg_color
to #f5f5bf#
and tooltip_fg_color
to #000000
. After restarting eclipse, the change took effect.
Upvotes: 18
Reputation: 1942
I think the answer here to have a properly formattet tooltip (at least for people who use ubuntu and want to have a nice hover tooltip) with html elements like links working is to install libwebkitgtk as it is used by eclipse to show javadoc. It is not preinstalled on e.g. Ubuntu and does not come with eclipse.. use:
sudo apt-get install libwebkitgtk-1.0-0
and restart eclipse to have good looking tooltips.
Upvotes: 0
Reputation: 70
You can change the color in
Windows->Preferences->general->Appearance .
Upvotes: -2
Reputation: 15906
Window > Preferences > General > Appearance > Colors And Fonts > Java
> Javadoc View Background
Upvotes: 92
Reputation: 71
Install the "GNOME Color Chooser" in Ubuntu (worked also on Xubuntu)
There you can set the Tooltip colors under the tab "Specific"
Upvotes: 7
Reputation: 784
As a KDE user you have to change the tooltip background color with systemssttings
.
Navigate to
Application Apperearence -> Colors -> Colors
and adjust the Tooltip Background
and Tooltip Text
colors.
Upvotes: 8
Reputation: 13590
Also try this sudo apt-get install libwebkitgtk-1.0-0
after I installed the lib the javadoc looks so much better
After installing brand new Eclipse, you may notice, that hover, which shows javadoc comments, and Javadoc view render javadoc comments as a plain text. Eclipse simply ignores all the @link and @see annotations. Well, it's actually not the problem of view itself. The problem is that default Eclipse browser is not working from the box in Ubuntu 12.04. To make it works you need to install libwebkitgtk-1.0-0 package. Just type in the terminal:
source: http://ubuntu-user-tricks.blogspot.com/2012/09/3-things-to-do-after-installing-eclipse.html
Upvotes: 0
Reputation: 5513
On ubuntu 12.10 (quantal) you can use the following two commands:
#foreground white => black
sudo sed -i s/tooltip_fg_color:#ffffff/tooltip_fg_color:#000000/g /usr/share/themes/Ambiance/gtk-3.0/settings.ini /usr/share/themes/Ambiance/gtk-3.0/gtk.css /usr/share/themes/Ambiance/gtk-2.0/gtkrc
#background black => yellow
sudo sed -i s/tooltip_bg_color:#000000/tooltip_bg_color:#f5f5b5/g /usr/share/themes/Ambiance/gtk-3.0/settings.ini /usr/share/themes/Ambiance/gtk-3.0/gtk.css /usr/share/themes/Ambiance/gtk-2.0/gtkrc
(Thanks to the other answers and this that helped me to figure this out)
Upvotes: 7
Reputation: 7923
You need to change the 'Tooltip' color in Ubuntu at the OS level.
Upvotes: 24