K
K
KPEBETKA2014-01-12 01:57:01
Python
KPEBETKA, 2014-01-12 01:57:01

Wx.TaskBarIcon, how to implement transparent icon background?

It seems to be a trifle, but I just can not figure it out.
I do everything as expected, but the background of the icon is opaque.

ON_ICON = PyEmbeddedImage(
    "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA"
    "CXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH3gEJBhgdQRg59wAAAV9JREFUSMftlk1LQkEU"
    "hp+5Hy4s/ArciqnVQq5B5CYItUCIwJb9lH6A1KL29QPatAva1L7CqAhUggoU95oGYalXp0UF"
    "EmVeW1We1TDnzPsMZ86ZGfhXVipl3aVS1m1ljfguoFDIGcKUGwiSgAogwURw1EGuBYOR/MCA"
    "4k12SgrOhMABYJrtRykluq6NAkgpH6Qqo4HA9O1XGlovQKvd2tJ13VG5r13tHxzu5fPXZZvN"
    "pkyGQmMrqeSqx+2KtJvtTSA1EEDT1DjASeZyJ51e3wXqby671+utLS/FtxUhFnppKD3zJxQ7"
    "QCKxmOkSB6jPx2LHAIqqjgwMeLdwOPz0cc4wjOd+1mq9SrLTfB2bZmO82ax7uv2m2XB1x/p8"
    "RrXvKireZS+AGUtNIjn3TxjRflM0Y7kLBbMDn8FPbAgYAn4B4NOrolyu5JxOp9+KULVWK1h5"
    "cOYAj8XNVoDTv/dReAHbt2r702VQXgAAAABJRU5ErkJggg==").GetIcon

class TaskBarIcon(wx.TaskBarIcon):
  def __init__(self):
    super(TaskBarIcon, self).__init__()
    self.SetIcon(OFF_ICON(), 'ИКОНКА')
    self.Bind(wx.EVT_TASKBAR_LEFT_DOWN, self.on_left_down)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question