No taskbar transparency on Ubuntu 10.10.

I am testing wxPython to build a GUI on my Ubuntu machine, but I can't
get the taskbar icon to work with transparency.

I have found some similar issues searching google, but no solutions.

Here is my sample code.

···

--
#!/usr/bin/env python

import wx

class TrayTest(wx.App):
    def __init__(self):
        wx.App.__init__(self, 0)

    def OnInit(self):
        icon = wx.Icon('idle.png', wx.BITMAP_TYPE_PNG)
        frame = wx.Frame(None)
        frame.SetIcon(icon)
        taskbar = wx.TaskBarIcon()
        taskbar.SetIcon(icon)
        return True

if __name__ == '__main__':
    app = TrayTest()
    app.MainLoop()
--

print wx.version()

2.8.11.0 (gtk2-unicode)

print wx.__version__

2.8.11.0

Here is what it looks like (far left icon):
http://ben.timby.com/pub/ss.png

Here is the icon so you can see that it is transparent.
http://ben.timby.com/pub/idle.png

Any ideas what I am doing wrong?

I think you may have been bitten by this bug:

Cheers, Frank

···

2010/11/19 btimby <btimby@gmail.com>:

I am testing wxPython to build a GUI on my Ubuntu machine, but I can't
get the taskbar icon to work with transparency.

Thank you for the information.

That page links to wxPython trac:

http://trac.wxwidgets.org/ticket/4810

Which seems to indicate that the available version (2.8.11) of
wxPython does not support transparency of system tray icons on Ubuntu?

The only solution now is to run the development release? Is there no workaround?

From what I read the problem is that the system tray icon uses the
app's background color rather than the panel's, is there a way to make
the app's background color transparent, but also make the window
visible?

This is kind of a show stopper for me as the system tray icon is integral...

···

On Sat, Nov 20, 2010 at 5:55 PM, Frank Niessink <frank@niessink.com> wrote:

I think you may have been bitten by this bug:
https://bugs.launchpad.net/ubuntu/+source/checkgmail/+bug/403135

I spent some time building 2.9.1.1 last night, and indeed the
transparent icon works correctly.

I would still prefer to use the stable/released version of wxPython, I
don't want to have to distribute the development version with my
software.

In other words, I am still interested in any other workarounds.

Thanks.

Not an ideal solution, but you could always change your icon to one that does not have transparent areas and uses the full image area.

···

On 11/20/10 5:43 PM, Ben Timby wrote:

On Sat, Nov 20, 2010 at 5:55 PM, Frank Niessink<frank@niessink.com> wrote:

I think you may have been bitten by this bug:
https://bugs.launchpad.net/ubuntu/+source/checkgmail/+bug/403135

Thank you for the information.

That page links to wxPython trac:

wxTrac has been migrated to GitHub Issues - wxWidgets

Which seems to indicate that the available version (2.8.11) of
wxPython does not support transparency of system tray icons on Ubuntu?

The only solution now is to run the development release? Is there no workaround?

From what I read the problem is that the system tray icon uses the
app's background color rather than the panel's, is there a way to make
the app's background color transparent, but also make the window
visible?

--
Robin Dunn
Software Craftsman