Fix Clearlooks GTK+ 2 theme missing menu borders on Java applications

ClearlooksDue to current Gnome 3 and Unity madness I still use good old GNOME 2 based Linux operating systems like Centos 6 and Ubuntu 10.04 LTS on all my machines. When I need productivity I put on my Clearlooks theme. Clearlooks is simple and elegant theme engine for GTK+ used by default by GNOME desktop environment version 2. This is theme that has been around for years and if you have GNOME 2 on your machine you most likely have Clearlooks theme. A few years ago I've noticed a little bug with Java based applications. Basically when you switch to Clearlooks theme your Java applications loose menu borders. In this article I'm bringing workaround for missing menu borders on Java applications with Clearlooks GTK+ 2 theme.

We will fix this issue by editing Clearlooks gtkrc file. On average Linux system you can do something like this:

sudo nano /usr/share/themes/Clearlooks/gtk-2.0/gtkrc

Now you need to find following code fragment:

style "menu" {
        xthickness = 0
        ythickness = 0
 
        bg[NORMAL]        = shade (1.08, @bg_color)
 
        engine "clearlooks" {
                radius = 0.0
        }
}

You should change xthickness and ythickness parameters like this:

style "menu" {
        xthickness = 1
        ythickness = 1
 
        bg[NORMAL]        = shade (1.08, @bg_color)
 
        engine "clearlooks" {
                radius = 0.0
        }
}

Here's screenshot displaying Netbeans 7.1 Java based IDE menu before and after this workaround:

Clearlooks before - after

Dear Gnome developers, this is how most Linux people handle transition to Gnome 3 desktop environment. Enjoy!

DevGenii

E-commerce is a breeze with Magento Certified Developer Plus & Zend Certified PHP Engineer nearby. Get in touch!

4 thoughts on “Fix Clearlooks GTK+ 2 theme missing menu borders on Java applications

  1. Marco

    Thank you!!!
    I fixed Netbeans appearence on Centos 6.4.
    On this system the default theme is Slider so I did the same thing on folder /usr/share/themes/Slider/gtk-2.0/gtkrc ant it worked!!!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *