Tray icons not transparent?

Live forum:


31-07-2007 02:49:06

I've been using RutilT successfully now for a while, but I noticed that the tray icons don't have a transparent background. I thought to myself, "Hey, that would be a good contribution to the project - I think I'll try to modify them so that they have a transparent background!" So, I copied the PNGs from /usr/share/pixmaps/rutilt to another folder, and opened them in GIMP. But, when they opened in GIMP, they had transparent backgrounds!

So, my question is this - why is the transparent background not rendered as transparent? I'm using Ubuntu Feisty Fawn 7.04, and I've attached a screen shot (cropped to the relevant upper right-hand corner) showing how they're rendered. I use transparency on my toolbars, so the background image shows through some.

Any ideas?


31-07-2007 10:28:25

This has already been discussed here[/url2f6l6w46].
It seems to be a Gnome bug. But, if you find a way to make it work, I'm sure that Romain and every Rutilt users will be happy.


31-07-2007 13:06:04

Thanks for the link. I'll be finishing up some online classes today (those have been taking up most of my free time), so I'll take a look at them - maybe I can figure something out. )


01-08-2007 01:43:34

Well, I've ruled out the icons. I copied an icon from gaim over to the rutilt directory, and fired it up. The gaim icon had a non-transparent background as well.

I'm planning to dig into Banshee's code and find out how they render the icon, then compare it to the way rutilt's code is doing it. Maybe they're using a different rendering method. The search continues...


03-08-2007 02:12:07

I've been investigating, and if it's the "gtk_image_new_from_file" routine that has the bug (if there is a bug), it might work if a pixbuf is created first, then the image created from the pixbuf. However, I'm barely literate with C, and gdk_pixbuf_new_from_file requires two parameters. I just can't seem to come up with something that the compiler will accept.

It's on line 32 of TrayIcon.cxx. This is what the old line looks like...
[code13yteyzs] m_pIcon (GTK_IMAGE (::gtk_image_new_from_file (FileName.c_str()))),[/code13yteyzs]
and this is my idea to try...
[code13yteyzs] m_pIcon (GTK_IMAGE (::gtk_image_new_from_pixbuf (::gdk_pixbuf_new_from_file (FileName.c_str(), SOMETHING)))),[/code13yteyzs]

Of course, where SOMETHING is replaced with "something" that will compile. The second parameter is a GError return code that will be set if the file is not loaded. For these cases, we could just blow it off, the same way gtk_image_new_from_file does now.

Any thoughts?


03-08-2007 16:56:44

idea Maybe you can find some examples in Gnome Power Manager[/url1jr3d87v] (solution for Gnome only ?), in [url=]J.Y. Lefort Mail Notification[/url1jr3d87v] or even in [url=]gTVG TV guide[/url1jr3d87v] code.


05-08-2007 08:48:31

Interesting, I'll have a look at how pictures can be loaded an try to have that sorted out. Thanks for the investigation.


26-11-2007 11:23:59

RutilT 0.16 has now transparent icons in systray.