Eclipse in Ubuntu: hover background color property, where?
Asked Answered
B

9

31

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).

Bunin answered 21/3, 2011 at 16:59 Comment(1)
askubuntu.com/questions/70599/…Karinakarine
B
21

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.

Brade answered 4/1, 2012 at 11:16 Comment(4)
This works for Ubuntu. I had no clue it was going to be a System property.Lamebrain
Didn't find in 12.04. nome-color-chooser solved the problemFricassee
You can use the "GNOME Color Chooser" (under the tab "specific", freely translated from German).Superfluous
@CedricReichenbach: Thanks. Works in Ubuntu 14.04. Need to restart Eclipse for changes to take effect.Yawp
S
14

Preferences -> Java -> Editor -> "Source hover background"?

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.

Sorrows answered 21/3, 2011 at 17:42 Comment(3)
no. I checked already all possible obvious values... Still, thanksBunin
What kind of hover do you mean?Sorrows
It was the OS tooltip background color (I use Ubuntu Radiance) I figured this out before you answered. I got the preferences of eclipse, then searched for all the defined colors with cat prefs.epf | grep "[0-9]\{0,3\},[0-9]\{0,3\},[0-9]\{0,3\}" Since the background color was black (0,0,0) I didn't find any at all in the file and that made me search in SO. I had no idea about this.Bunin
M
8

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.

Menticide answered 8/3, 2013 at 22:10 Comment(2)
I tried this in KDE, but nothing changed in Eclipse. Is there anywhere else it could be hiding?Depolymerize
@Depolymerize - Did you try to restart Eclipse? This answer worked for me after closing and reopening eclipse.Allpurpose
S
3

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.

Sporogenesis answered 19/8, 2012 at 16:2 Comment(2)
This helped me with Eclipse on KDE, thanks. All of the other explanations are for gnome.Dufour
this is not an answer to the questionMerrel
P
2

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.

Placebo answered 20/6, 2014 at 19:42 Comment(1)
This is correct, as addressed in another question, mentioned also in jmiserez's answer. It's Ubuntu system-wide property and must be changed in the system config.Bighorn
W
2

Just go to:

Preferences -> Appearance

and choose a Theme other than GTK

Westminster answered 16/1, 2016 at 14:12 Comment(0)
R
2

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.

However, on some versions of Ubuntu (specifically 14.04), none of the methods mentioned in the answers so far work correctly.

In that case, refer to this this answer on 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).

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.

Resolved answered 26/4, 2016 at 14:12 Comment(1)
Genius! I must upvote this. I am with Ubuntu 16.04 LTS. No "Color" to select in Preference - Apprearance. Choose another theme not work.Bighorn
B
2

For me, no proposed solution did work. I ended up adding the following to eclipse.ini:

--launcher.GTK_version 2

Byzantine answered 5/1, 2017 at 10:7 Comment(1)
Thank you! This worked for me on Ubuntu Mate 18.04.01Roth
Y
0

Preferences -> General -> Appearance -> Colors and Fonts -> Java -> Colored labels (or anything in here)

Yowl answered 21/3, 2011 at 18:15 Comment(1)
I'm actually not sure if this works, I will look into it a bit furtherYowl

© 2022 - 2024 — McMap. All rights reserved.