[Gtk-sharp-list] Change background of widget using theme colors

Mark A. Nicolosi mark.a.nicolosi at gmail.com
Sun Aug 3 02:01:53 EDT 2008


I'm trying to make an application have a bar similar to the one in Nautilus
when you visit the trash location. I've got it to work by changing the
background in OnRealized() of my widget:

        protected override void OnRealized ()
            base.ModifyBg (StateType.Normal, base.Style.Background
            base.OnRealized ();

Now the problem is, I want it to change when the theme changes like the rest
of Gnome. I can't call base.ModifyBg() in OnStyleSet(), it crashes the
program (I think Gtk+ gets in an infinite loop).

Anyone have any ideas?

Mark A. Nicolosi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080803/1bd92758/attachment.html 

More information about the Gtk-sharp-list mailing list