[Gtk-sharp-list] Transparent tray icon

Suco sucotronic at gmail.com
Mon Feb 4 07:10:02 EST 2008


I've find this documentation about tray icons with mono:
http://www.mono-project.com/GtkSharpNotificationIcon

But the result tray icon doesn't have a transparent background.
This is my code
this.icon = Gdk.Pixbuf.LoadFromResource("pru.png");
Gtk.Image kk = new Gtk.Image(icon.ScaleSimple(24, 24, Gdk.InterpType.Hyper));

EventBox eb = new EventBox();
eb.Add(kk);
eb.ButtonPressEvent += new ButtonPressEventHandler(OnTrayClicked);

TrayIcon Icon = new TrayIcon("pru");
   Icon.GdkWindow.SetBackPixmap (null, true);
Icon.ShowAll();

Any idea to solve it?


More information about the Gtk-sharp-list mailing list