Linked by Thom Holwerda on Thu 13th Dec 2007 18:27 UTC, submitted by SEJeff
GTK+ "GNOME theme engine designer Andrea Cimitan has implemented support for transparent widgets in the Murrine GTK theme engine, bringing Vista-like translucent glass effects to the GNOME desktop. Cimitan used RGBA colormaps to implement the feature and says that, with only 10 or 20 extra lines of code, translucency can easily be added to other theme engines that support RGBA. Cimitan says that the addition of translucency effects proves that critics of GTK are wrong. "[I]n the last week I've seen a lot of people claiming about 'lacks' of Gtk+ capabilities," wrote Cimitan in a blog entry. "Some of them still think that Gtk+ doesn't have RGBA support... Or it will require nasty hacks. This is absolutely false."
Thread beginning with comment 290580
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[5]: And QT?
by kanwar.plaha on Thu 13th Dec 2007 21:56 UTC in reply to "RE[4]: And QT?"
kanwar.plaha
Member since:
2006-02-20

You don't need a theme. Its built-in with KDElibs/Kdebase (one of them at least). It can be enabled for *any* theme at all.

Try and get a livecd of any KDE distribution and try it out -- Kubuntu/PCLinuxOS/Mandriva etc etc.

Reply Parent Bookmark Score: 1

RE[6]: And QT?
by jaylaa on Thu 13th Dec 2007 23:38 in reply to "RE[5]: And QT?"
jaylaa Member since:
2006-01-17

You don't need a theme. Its built-in with KDElibs/Kdebase (one of them at least). It can be enabled for *any* theme at all.

Well, I have never came across something where I could change the transparency level of different components. But I'd like to see it.

I have kcontrol open right now and am ready to try it. So I wish people would stop saying "KDE could do this for years" and start showing us how to do it. Or stop making the claim.

Reply Parent Bookmark Score: 3

RE[7]: And QT?
by Havin_it on Fri 14th Dec 2007 01:22 in reply to "RE[6]: And QT?"
Havin_it Member since:
2006-03-10

If you have the Composite extension enabled in Xorg, you should have some options available under Control Centre -> Desktop -> Window Behaviour -> Translucency. I've had this since KDE 3.5.5 or thereabouts I believe, though I don't know if it is something that has to be compiled-in specially or not.

Reply Parent Bookmark Score: 2

RE[7]: And QT?
by segedunum on Fri 14th Dec 2007 02:02 in reply to "RE[6]: And QT?"
segedunum Member since:
2005-07-06

I have kcontrol open right now and am ready to try it. So I wish people would stop saying "KDE could do this for years" and start showing us how to do it. Or stop making the claim.

Well, you can't go into the Gnome control panel today and enable transparent effects in GTK themes. This announcement will not give you that. However, support for this stuff has been in Qt from the ground up for a couple of years (three years even) ever since Qt4 came into existence, and screenshots of KDE 4 and Qt using it are a penny a dozen. Transparent widgets and all - all done through the paint engine in one place incidentally. Screenshots are one thing, working is something else.

The trouble with this and GTK is that it isn't really news, although it probably looks like it to most of the uninitiated:

1. This is not done through Cairo in one central point (from what he writes anyway). What we have are two drawing engines, and GDK is fundamentally incompatible with Cairo - unless themes themselves make use of it, and even then, you'll have to do some copying and pasting. GTK themes can only paint into GDK rendering contexts and not Cairo ones, and if you want to, the hacks should make you shudder. We're into copying pixmaps.

2. He talks about people thinking that GTK doesn't have RGBA support, which I find bizarre - or it's a slip of the keyboard ;-). This is rather inefficient, both memory and performance-wise. gdk-pixbuf handles both RGB and RGBA, but what people are interested in is ARGB - which most X servers use I believe. GTK and GDK just don't do ARGB. This does require nasty hacks, and how this is 'fast', I have no idea.

3. In the depths of my mind on some forum somewhere, I can remember some hack being done like this for GTK themes not long ago. Whether it is done in the same way, I don't know. The GTK theme engine, I think, generally draws a grey background pixmap and then renders the widget on top. One approach was to overdraw this pixmap with a background rgba (setting the default colourmap for widgets to rgba), and a future idea was to actually make the background pixmap transparent. You need compositing here, and I think composite checking went into GTK circa 2.8.

4. I can see a lot of application specific issues with this, particularly with GTK using applications like Firefox. Firefox does weird stuff to put it mildly.

5. This is all just crack painting next to a toolkit that actually does this for you from the ground up. Next to Quartx and WPF, this is an embarrassment trying to hold this up as some sort of equivalent. When KDE 4 gets rolling and starts using Qt 4 more fully, hopefully we will see this on Linux desktops. Hacked widget transparency in every theme is a joke next to these toolkits, and once you scratch away the screenshot, the cracks show.

EDIT: You need application support as well!

6. To do this kind of think in GTK requires a developer well versed in programming this. To do this on Vista, OS X and KDE 4 all you need to be is a Flash thingy designer really. KDE 4 needs a piece of designer software though, but Plasma scripting makes it reasonably possible and just about reachable for most.

7. Referring to point 5 and 6, it is impossible to do this within the current context of GTK 2.x. It requires GTK 3, and it can't be API or ABI compatible.

8. Until we see some code for this in GTK and Gnome, it means pretty much nothing. It's just a sad show-off, that doesn't mean all that much, just to keep the 'bling' crowd interested.

Edited 2007-12-14 02:17

Reply Parent Bookmark Score: -1