KDE: Dark theme and custom styles for gtk apps

In case you’ve a dark kde desktop theme and some installed gtk driven apps are looking weird like gtk toolips, then you’ve to change the gtk styles.

Change gtk styles

Normally you change gtk styles with the KDE Control Center.
Open:

# kcontrol

Go to “Appereance & Themes > GTK Styles and Fonts” and customize the styles.

If this way of customizing doesn’t fit your requirements you can also change styles in the .gtkrc-2.0-kde config file in your home directory.

Example: GTK tooltip

I had the problem that GTK tooltips had a white foreground color and that you couldn’t read anything because of that.

GTK tooltips:

To correct this open “.gtkrc-2.0-kde” in a text editor and add the following lines at the end:

# gtk tooltip style for kde dark themes
style "tooltip"
{
fg[NORMAL] = "#000000"
}
widget "*tooltip*" style "tooltip"

Save and exit.

To make the changes take place logout and re-login to your X-session.

GTK tooltips after customization:

Done.