зеркало из https://github.com/mono/mail-archives.git
129 строки
5.7 KiB
HTML
129 строки
5.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Embed Gtk+ theme into app
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=Re%3A%20%5BGtk-sharp-list%5D%20Embed%20Gtk%2B%20theme%20into%20app&In-Reply-To=%3C524E6177.7090704%40silbermayr.at%3E">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<style type="text/css">
|
|
pre {
|
|
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
|
|
}
|
|
</style>
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="011325.html">
|
|
<LINK REL="Next" HREF="011327.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Embed Gtk+ theme into app</H1>
|
|
<B>Wolfgang Silbermayr</B>
|
|
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=Re%3A%20%5BGtk-sharp-list%5D%20Embed%20Gtk%2B%20theme%20into%20app&In-Reply-To=%3C524E6177.7090704%40silbermayr.at%3E"
|
|
TITLE="[Gtk-sharp-list] Embed Gtk+ theme into app">wolfgang at silbermayr.at
|
|
</A><BR>
|
|
<I>Fri Oct 4 06:34:31 UTC 2013</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="011325.html">[Gtk-sharp-list] Embed Gtk+ theme into app
|
|
</A></li>
|
|
<LI>Next message: <A HREF="011327.html">[Gtk-sharp-list] Embed Gtk+ theme into app
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#11326">[ date ]</a>
|
|
<a href="thread.html#11326">[ thread ]</a>
|
|
<a href="subject.html#11326">[ subject ]</a>
|
|
<a href="author.html#11326">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>On 2013-10-03 22:42, Weston Weems wrote:
|
|
><i> Wow that worked almost perfectly... I had to track down windows version
|
|
</I>><i> of some of the theme engines, the themes I was trying to use,
|
|
</I>><i> utilized.... but aside from that it was good.
|
|
</I>><i>
|
|
</I>><i> Is there any rhyme or reason on how to help the theme engine locate
|
|
</I>><i> resources like images and such? Some of these themes will do like a
|
|
</I>><i> ./assets/toolbarbg.png or whatever...
|
|
</I>
|
|
Good to see that it helped.
|
|
|
|
I have not investigated this further, but I think you have to start from
|
|
the Icon* classes, like IconFactory, IconSource or IconTheme. I have,
|
|
however, not yet figured out the link that leads from Gtk.Rc towards the
|
|
Icon* classes.
|
|
|
|
><i> On Wed, Oct 2, 2013 at 12:05 AM, Wolfgang Silbermayr
|
|
</I>><i> <<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">wolfgang at silbermayr.at</A> <mailto:<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">wolfgang at silbermayr.at</A>>> wrote:
|
|
</I>><i>
|
|
</I>><i> On 2013-10-01 19:05, Weston Weems wrote:
|
|
</I>><i> > I'd like to embed a gtk+ theme, so I can effectively skin my app and
|
|
</I>><i> > look the same way regardless of what default gtk+ theme is setup.
|
|
</I>><i> >
|
|
</I>><i> > Is this something I can do? I've read people make comments of using
|
|
</I>><i> > resource files etc... but I have yet to hear specific details on
|
|
</I>><i> this...
|
|
</I>><i> > or better yet an example.
|
|
</I>><i> >
|
|
</I>><i> > Anyone have any pointers?
|
|
</I>><i>
|
|
</I>><i> You can deploy your own gtkrc file and load the data from there:
|
|
</I>><i>
|
|
</I>><i> Gtk.Application.Init();
|
|
</I>><i> string filename = "/the/path/to/my.gtkrc";
|
|
</I>><i> Gtk.Rc.Parse(filename);
|
|
</I>><i>
|
|
</I>><i> or my preferred method: you include the gtkrc file as a resource inside
|
|
</I>><i> your assembly:
|
|
</I>><i>
|
|
</I>><i> Gtk.Application.Init();
|
|
</I>><i> using (Stream stream =
|
|
</I>><i> GetType().Assembly.GetManifestResourceStream("my.gtkrc"))
|
|
</I>><i> {
|
|
</I>><i> using (TextReader reader = new StreamReader(stream))
|
|
</I>><i> {
|
|
</I>><i> Gtk.Rc.ParseString (reader.ReadToEnd());
|
|
</I>><i> }
|
|
</I>><i> }
|
|
</I>><i>
|
|
</I>><i> Hope this helps.
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> _______________________________________________
|
|
</I>><i> Gtk-sharp-list maillist - <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">Gtk-sharp-list at lists.ximian.com</A>
|
|
</I>><i> <mailto:<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">Gtk-sharp-list at lists.ximian.com</A>>
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>
|
|
|
|
-------------- next part --------------
|
|
A non-text attachment was scrubbed...
|
|
Name: signature.asc
|
|
Type: application/pgp-signature
|
|
Size: 551 bytes
|
|
Desc: OpenPGP digital signature
|
|
URL: <<A HREF="http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20131004/0e7b44b0/attachment.pgp">http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20131004/0e7b44b0/attachment.pgp</A>>
|
|
</PRE>
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="011325.html">[Gtk-sharp-list] Embed Gtk+ theme into app
|
|
</A></li>
|
|
<LI>Next message: <A HREF="011327.html">[Gtk-sharp-list] Embed Gtk+ theme into app
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#11326">[ date ]</a>
|
|
<a href="thread.html#11326">[ thread ]</a>
|
|
<a href="subject.html#11326">[ subject ]</a>
|
|
<a href="author.html#11326">[ 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>
|