20080214

Integrating GTK apps with the KDE4 desktop with gtk-qt for Qt4 (screenshots)

For KDE3 David Sansome wrote a special GTK theme gtk-qt, which instead of drawing its own representation of buttons and other user interface elements, called the corresponding Qt3 drawing functions. Believe me, this sounds a lot more trivial than it is.

When it was done, it showed some very impressive results.
gtk-qt for KDE3Image courtesy of David Sansome


However, after KDE4 was released (my review), Qt3 started to look equally out of place as gtk rather quickly, when the Oxygen widget style manifested itself as the default KDE4 look:


When Firefox 3 beta 3 was released the other day I tried to get a glimpse of the new gtk widget integration. Suffice it to say: It looked really strange and not like something they would have bragged about.


It's obviously KDE3 showing here. So I decided to see if there was a KDE4 version of gtk-qt. It turns out there isn't. But I found this bug report and a reply by David Sansome himself, stating that:
Just wanted to let you know that I *am* working on this, but as previous posters have said Qt4 has changed a lot in the theming department and it's not as simple as just porting the old code over.

He has created a branch in the development repository, which I have checked out. Screnshots incoming!

Keep in mind: THIS IS NOT A RELEASE! But very much a work in progress. If there are problems, they will be ironed out!

The first impression is that it looks very impressive!


The not quite so straight-forward firefox interface reveals some drawing issue though:

But they are IMHO a lot better to look at than the qt3 version, which just looks thoroughly out of place:


There are also issues with widgets embedded into web pages, which disappear on a re-draw (for example scrolling page-wise, not progressively).

Compare with the same piece rendered by Konqueror:


Overall the port seems to be progressing well (the repository is seeing frequent commits) and I look forward to GTK apps integrating more smoothly with the KDE4 desktop.

Update: I have made a mistake attributing the brokenness we saw with the current firefox beta to gtkqt. Instead it appears the feature was not working quite correctly in firefox itself. I noticed a couple of days after this post was published that the same drawing weirdness we saw in the screenshot also appears on a pure gnome system. I can't reproduce it now and as matter of fact the current ubuntu packages on hardy make firefox fit in nicely.
Sorry about this mis-information. It seems gtkqt4 is in even better shape than I originally thought.

No comments: