зеркало из https://github.com/mono/mail-archives.git
136 строки
6.4 KiB
HTML
136 строки
6.4 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=%3C524E6E1E.3010906%40dyalog.com%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="011326.html">
|
|
<LINK REL="Next" HREF="011335.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Embed Gtk+ theme into app</H1>
|
|
<B>Liam Flanagan</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=%3C524E6E1E.3010906%40dyalog.com%3E"
|
|
TITLE="[Gtk-sharp-list] Embed Gtk+ theme into app">liam at dyalog.com
|
|
</A><BR>
|
|
<I>Fri Oct 4 07:28:30 UTC 2013</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="011326.html">[Gtk-sharp-list] Embed Gtk+ theme into app
|
|
</A></li>
|
|
<LI>Next message: <A HREF="011335.html">[Gtk-sharp-list] Update for http://www.mono-project.com/Mono.Cairo
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#11327">[ date ]</a>
|
|
<a href="thread.html#11327">[ thread ]</a>
|
|
<a href="subject.html#11327">[ subject ]</a>
|
|
<a href="author.html#11327">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Could this method be used to embed a font into a Gtk# application?
|
|
|
|
Thanks,
|
|
|
|
Liam
|
|
On 04/10/2013 07:34, Wolfgang Silbermayr wrote:
|
|
><i> On 2013-10-03 22:42, Weston Weems wrote:
|
|
</I>>><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>><i> Good to see that it helped.
|
|
</I>><i>
|
|
</I>><i> I have not investigated this further, but I think you have to start from
|
|
</I>><i> the Icon* classes, like IconFactory, IconSource or IconTheme. I have,
|
|
</I>><i> however, not yet figured out the link that leads from Gtk.Rc towards the
|
|
</I>><i> Icon* classes.
|
|
</I>><i>
|
|
</I>>><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>><i>
|
|
</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> <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
|
|
</I>
|
|
-------------- next part --------------
|
|
An HTML attachment was scrubbed...
|
|
URL: <<A HREF="http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20131004/7f4ca690/attachment.html">http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20131004/7f4ca690/attachment.html</A>>
|
|
</PRE>
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="011326.html">[Gtk-sharp-list] Embed Gtk+ theme into app
|
|
</A></li>
|
|
<LI>Next message: <A HREF="011335.html">[Gtk-sharp-list] Update for http://www.mono-project.com/Mono.Cairo
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#11327">[ date ]</a>
|
|
<a href="thread.html#11327">[ thread ]</a>
|
|
<a href="subject.html#11327">[ subject ]</a>
|
|
<a href="author.html#11327">[ 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>
|