зеркало из https://github.com/mono/mail-archives.git
90 строки
3.8 KiB
HTML
90 строки
3.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Transparent tray icon
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Transparent%20tray%20icon&In-Reply-To=256d62360802040410t4081c6c1ie3fc43dfc0968d64%40mail.gmail.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="008392.html">
|
|
<LINK REL="Next" HREF="008434.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Transparent tray icon</H1>
|
|
<B>Michael Hutchinson</B>
|
|
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Transparent%20tray%20icon&In-Reply-To=256d62360802040410t4081c6c1ie3fc43dfc0968d64%40mail.gmail.com"
|
|
TITLE="[Gtk-sharp-list] Transparent tray icon">m.j.hutchinson at gmail.com
|
|
</A><BR>
|
|
<I>Thu Feb 7 14:15:06 EST 2008</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="008392.html">[Gtk-sharp-list] Transparent tray icon
|
|
</A></li>
|
|
<LI>Next message: <A HREF="008434.html">[Gtk-sharp-list] Automatically updating via ListStore.RowChanged event? (beginning C#/Gtk# programming)
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#8402">[ date ]</a>
|
|
<a href="thread.html#8402">[ thread ]</a>
|
|
<a href="subject.html#8402">[ subject ]</a>
|
|
<a href="author.html#8402">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>On Feb 4, 2008 7:10 AM, Suco <<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">sucotronic at gmail.com</A>> wrote:
|
|
><i> I've find this documentation about tray icons with mono:
|
|
</I>><i> <A HREF="http://www.mono-project.com/GtkSharpNotificationIcon">http://www.mono-project.com/GtkSharpNotificationIcon</A>
|
|
</I>><i>
|
|
</I>><i> But the result tray icon doesn't have a transparent background.
|
|
</I>><i> This is my code
|
|
</I>><i> this.icon = Gdk.Pixbuf.LoadFromResource("pru.png");
|
|
</I>><i> Gtk.Image kk = new Gtk.Image(icon.ScaleSimple(24, 24, Gdk.InterpType.Hyper));
|
|
</I>><i>
|
|
</I>><i> EventBox eb = new EventBox();
|
|
</I>><i> eb.Add(kk);
|
|
</I>><i> eb.ButtonPressEvent += new ButtonPressEventHandler(OnTrayClicked);
|
|
</I>><i>
|
|
</I>><i> TrayIcon Icon = new TrayIcon("pru");
|
|
</I>><i> Icon.GdkWindow.SetBackPixmap (null, true);
|
|
</I>><i> Icon.ShowAll();
|
|
</I>><i>
|
|
</I>><i> Any idea to solve it?
|
|
</I>
|
|
That page has unfortunately not been updated in 2.5 years, and it's
|
|
likely that some things have changed since it was last updated. It
|
|
also makes a lot of X11-specific call, which is not portable. It's
|
|
probably possible to make it work, but I'm not surre how. Did you try
|
|
it unscaled?
|
|
|
|
If you're using GTK# 2.10 or later, there's a new cross-platform
|
|
StatusIcon class that may be useful to you -- and also a TrayIcon
|
|
class that's X11 only but offers the ability to plug in arbitrary
|
|
widgets.
|
|
|
|
--
|
|
Michael Hutchinson
|
|
<A HREF="http://mjhutchinson.com">http://mjhutchinson.com</A>
|
|
</PRE>
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="008392.html">[Gtk-sharp-list] Transparent tray icon
|
|
</A></li>
|
|
<LI>Next message: <A HREF="008434.html">[Gtk-sharp-list] Automatically updating via ListStore.RowChanged event? (beginning C#/Gtk# programming)
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#8402">[ date ]</a>
|
|
<a href="thread.html#8402">[ thread ]</a>
|
|
<a href="subject.html#8402">[ subject ]</a>
|
|
<a href="author.html#8402">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
|
|
mailing list</a><br>
|
|
</body></html>
|