[Gtk-sharp-list] Embed Gtk+ theme into app
liam at dyalog.com
Fri Oct 4 07:28:30 UTC 2013
Could this method be used to embed a font into a Gtk# application?
On 04/10/2013 07:34, Wolfgang Silbermayr wrote:
> On 2013-10-03 22:42, Weston Weems wrote:
>> Wow that worked almost perfectly... I had to track down windows version
>> of some of the theme engines, the themes I was trying to use,
>> utilized.... but aside from that it was good.
>> Is there any rhyme or reason on how to help the theme engine locate
>> resources like images and such? Some of these themes will do like a
>> ./assets/toolbarbg.png or whatever...
> 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.
>> On Wed, Oct 2, 2013 at 12:05 AM, Wolfgang Silbermayr
>> <wolfgang at silbermayr.at <mailto:wolfgang at silbermayr.at>> wrote:
>> On 2013-10-01 19:05, Weston Weems wrote:
>> > I'd like to embed a gtk+ theme, so I can effectively skin my app and
>> > look the same way regardless of what default gtk+ theme is setup.
>> > Is this something I can do? I've read people make comments of using
>> > resource files etc... but I have yet to hear specific details on
>> > or better yet an example.
>> > Anyone have any pointers?
>> You can deploy your own gtkrc file and load the data from there:
>> string filename = "/the/path/to/my.gtkrc";
>> or my preferred method: you include the gtkrc file as a resource inside
>> your assembly:
>> using (Stream stream =
>> using (TextReader reader = new StreamReader(stream))
>> Gtk.Rc.ParseString (reader.ReadToEnd());
>> Hope this helps.
>> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
>> <mailto:Gtk-sharp-list at lists.ximian.com>
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list