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

Christian Hoff christian_hoff at gmx.net
Sun Aug 3 04:15:50 EDT 2008


Could you please file a bug report with a test case?
> Hi,
>
> 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 
> (StateType.Selected));
>             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
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>   



More information about the Gtk-sharp-list mailing list