Not Registered Login | Register

How much GTK is in it?

last updated: 24. June 2007 since linux is gaining more and more importance on the desktop, there are more effort in creating linux desktop applications too.
This obviously requires that the application does integrate well into the desktop and does not stick out.

Since many of the applications being developed cross-plattform some sort of toolkit wrapper is being used to minimise porting effords. And these mostly rely on GTK because of its LGPL licensing which allows the use in closed source/ non-gpl applications.

Now I want to take a closer look at how well these GTK-Wrappers actually do. I picked out the combo-box and the treeview widgets.

The combobox has a very different behaviour on GTK in comparison the other toolkits and show whether the GTK wrapper also takes care of the platform specific behaviour or just mimics the look.

The treeview widget on the other hand shows how good the wrapper handles the mimicking part.

Native GTK

one option is of course using GTK directly, since GTK itself is basically cross platform too, but due to its poor integration on the windows platform and its very new OSX port it is the least used option.
So I take this mainly it as a reference how a application should look like.

the example application is Rhythmbox

  • notice the GTK specific combobox behaviour: on opening the list is being adjusted so the element which was selected stays at the same place
  • The treeview column headers use a special widgets which underlines the tabular style.


one of the oldest widget wrappers is wxWidgets(previously wxWindows) - lets look whether its age made it mature as well

the example application is aMule

  • the combobox mimics the native GTK behaviour, but the list does not have the full width of the clickable button like it should be
  • the treeview headers look like simple buttons although they are none

not really convincing

Mozilla XUL

mozilla products use a XML derived language called XUL to describe their GUI which in turn the plattform specific toolkit to draw them. Is the free software figurehead also a figurehead in linux integration?

the example application is Thunderbird

  • the combobox button look native but behaves like the windows pendant; it just drops down the list below the activation widget
  • the treeview uses its own header widgets and mimics just like the combobox the windows behaviour

I think its clear who Mozillas is aiming at


although the wrapper used by the OpenOffice project is only being used by them I take it in since it is the other well know cross platform application.


  • the combobox look only at the first glance native; it actually has drawing glitches and uses some custom drop down list
  • same goes to the treeview; custom column headers and furthermore bad behaveiour

you have drawing glitches on most of the widgets and the custom behaviour is behind what windows or GTK pendants offer. Clearly the last place.

Java Swing

Java got a massive improvement to the GTK look and feel in its 1.6 version so it might be considered to develop applications for the linux desktop.

the example application is the Java configuration Applet

  • the combobox does not look native at all; instead it mimics the windows look and behaviour
  • the treeview widget uses GTK buttons for column headers and uses its own reordering behaviour which is admirably better then the native windows & GTK one

considering that Java 1.6 is the first version with serious integration intents, the result is quite remarkable.

Java SWT

SWT was developed by IBM because the lack of Swing platform integration before version 1.6. Lets see how well it succeeded.

the example application is Eclipse

  • the combobox matches the native one in look and behaviour
  • the treeview just looks the same

although SWT uses some custom tab implementation I would say it is best suitable for linux desktop applications - especially considering that the GTK native tab implementation still is quite premature.

of course platform integration is about more than how the that two widgets look like, but I think that the picked widgets pretty good match the sate of the respective toolkits.

It should be also mentioned that real linux integration can only be achieved by using GTK directly since thisis the only posibility to take care of linux specific preferences like the user selected icon theme.