Recently I came across gtkrc files, and I found articles that use gtkrc files to tailor Eclipse's look for different reasons, and these includes tooltip colours, and making tabs compact. And that's what I really wanted. So I found this article, where the main article makes tabs compact, and the first comment shows how to make tooltips readable with the same approach.
First, you have to create a gtkrc somewhere on your computer containing something similar:
gtk-color-scheme = "selected_text_color:#000000"
font_name="Liberation Sans,Sans Regular 8"
text[SELECTED] = @selected_text_color
class "GtkWidget" style "compact"
class "GtkButton" style "compact2"
class "GtkToolbar" style "compact2"
class "GtkPaned" style "compact2"
They also complain about fonts, so this gtkrc changes fonts as well, which I removed, since I reduced font size in Gnome settings, and I was satisfied with that.
The first comment tells to append this to this gtkrc to make tooltips readable:
bg[NORMAL] = "#FFFFAF"
fg[NORMAL] = "#000000"
widget "gtk-tooltip*" style "gnome-color-chooser-tooltips"
After you saved the gtkrc, you have to make Eclipse run with the
GTK2_RC_FILES environment variable containing the path to your gtkrc file. I achieved this by altering the
/usr/share/applications/eclipse.desktop file to run
eclipse.sh instead of
eclipse, and I created eclipse.sh with the following content:
export LIBOVERLAY_SCROLLBAR=0 # This disables overlay scrollbars, its my preference
export GTK2_RC_FILES=$GTK2_RC_FILES:/home/tamas/eclipse.gtkrc # This sets gtkrc file
This made Eclipse almost perfect. I hope others will find it useful as well.