Ubuntu 11.10 (and maybe earlier versions as well) have a default theme called "Ambiance". This theme controls the colors of window borders and other such things. One of the things it controls is the background color of tooltips (those little things that hover over something when you mouse over it). In the Ambiance theme that background is black with a light foreground color for the text.
The problem with this is that Eclipse 3.7.1 (and maybe earlier versions) deals with colors in an odd way. Firstly control of the theme inside eclipse is controlled on a per-language or per-plugin basis (it's a bit more complicated then this). I'm using the "Dynamic Languages Toolkit - Ruby Development Tools" Eclipse plugin for Ruby development. This plugin picks it's own for the foreground text (black) and by default uses the system default background color (black when using the Ubuntu Unity Ambiance theme). This results in black on black text in tooltips inside Eclipse. Some interesting aspects of this :
- The Ruby Eclipse plugin has settings supposedly allowing you to change the tooltip background color, called "Source Hover Background" from the default setting of "System Default" to a user specified color within Eclipse. The broken thing about this is the following
- If you set a user defined Source Hover Background in Eclipse under the "Ruby"... "Editor"... "Appearance color options" preference page
- That setting will work and effect the background color of a tooltip the first time you mouse over something
- Once that happens, your preference is wiped back to "System Default" and all subsequent tooltips will display black on black
- I even tried making the preference files unwritable to prevent my preference from being overwritten. This resulted in the tooltip being the correct color the first time mousing over something each time I ran Eclipse, but then it would immediately revert to black on black.
- There is a bug on this over on the Eclipse bug site which is marked as "RESOLVED FIXED" which it clearly is not.
- There is an faq item regarding this problem on the Eclipse wiki
- There is a section that talks about this on the Ubuntu help page for Eclipse
After trying many of the various suggestions out there on the internet to fix this, I found one solution which worked.
The solution involves taking the "Ambiance" theme that comes with Ubuntu 11.10, copying it to your home directory, and modifying it to change the tooltip background color.
This can be done by installing the "gnome-tweak-tool" because the "Appearance" interface in Ubuntu 11.10 doesn't show you all of the Themes. Install it by running :
Once installed you can find it in the Unity dock under the name "Advanced Settings". This means that it isn't called Gnome Tweak Tool, it's listed as "Advanced Settings"
Once running go to the "Themes" section of the "Advanced Settings" tool and change your "Window Theme" from "Ambiance" to Ambiance-fixed-tooltip-bg-color"