View Single Post
Posts: 25 | Thanked: 8 times | Joined on Feb 2008
#7
Originally Posted by icer View Post
I tried to fiddle with the transparency too. There are some examples for python applications about it. Though not directly for home applets. What I found out is that in one step I was setting a rgba colormap but that method did not work. Here are few lines as an example:
e = gtk.EventBox()
rgba = gtk.gdk.Screen().get_rgba_colormap()
e.set_colormap(rgba)

So the code breaks on that last line. and the error I get is:
TypeError: GtkWidget.set_colormap() argument 1 must be gtk.gdk.Colormap, not None

So maybe the colormap methods are not ready or that particular way of coding cannot be applied in this context. I don't know.
From the documentation for gtk.gdk.Screen.get_rgba_colormap

Returns : a gtk.gdk.Colormap for use with windows with an alpha channel or None if the capability is not available.
It's returning None, so it sounds like the IT doesn't support gtk.gdk.Screen alphas. But other desktop applets have transparent backgrounds (or are at least emulating them somehow), so we know it can be done. It's just a question of can it be done via the Python bindings?