Changing Eclipse Hover Black Popup Color in Linux Mint

The Eclipse IDE is built with SWT, the Standard Widget Toolkit. Unlike Swing or other Java GUI Frameworks it works as a wrapper around GTK, or the Gnome Toolkit, the library underlying most Linux Desktops in Linux Mint and Ubuntu. This makes Eclipse a cleaner, more native-looking app for us Linux Cats than, say, IntelliJ IDEA which is built in Swing. That's a subjective call, of course, but it is central to the approach to…the black popup.

You know the one. THIS ugly thing.

You can go into Eclipse Preferences and change every color in every option dialog and it will have no effect because the display of the Eclipse Hover Popup is based on GTK settings, not Eclipse settings.

GTK Settings are configured with CSS and .INI files found in /usr/shared/themes/[yourtheme]. First thing we need to do is determine what theme we're using. If we look at our Theme Settings in Linux Mint Cinnamon we see the following (for my personal tastes anyway.)

What we're interested in is our Controls Theme, so we want to change our Ambiance settings. There are several files containing settings for tooltip_bg_color and tooltip_fg_color.

/usr/share/themes/Ambiance/gtk-3.0/settings.ini
/usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
/usr/share/themes/Ambiance/gtk-2.0/gtlrc

The only file that needs changing is gtk-main.css. Here's what we're looking at in a $ sudo gedit session with updated tooltip colors.

Restart Eclipse and we have successfully killed…the black popup.

A Caveat and a Warning

The Caveat for this procedure is that there are other factors at play which I haven't yet identified. The color in the resulting popup is not the same HEX color value as I entered into the Ambiance Theme settings files, that is, on my main development machine anyway. When I performed this procedure on my laptop, which has pretty much the identical Linux Mint setup, the color was a perfect match for its HEX equivalent. If you know what I'm missing, please use the G+ link below to clue me in.

The Warning is that this change affects your entire desktop mouseover hover colors, so you might want to chose a nice neutral color.  But hey, who doesn't love grey? Light or dark, grey is O-KAY!

Posted October 16, 2015 02:25 PM EDT

More Like This Post