On 10/31/07, Chris Rorvick <[EMAIL PROTECTED]> wrote:
> I have a GTK application that modifies the foreground and background of
> many different buttons rapidly.  These buttons should not be themed, so
> it seems that the gtk_widget_modify_*() functions incur an unnecessary
> overhead.  Is there a way to remove the theming of a widget?  I've tried

I do this by defining a set of styles in a style file (eg.
"error_style" is reddish), then have a line binding all widgets named
"error_widget" to "error_style". The colours there are based on the
shades of red in the gnome HIG.

style "error_style" = "default"
{
        bg[NORMAL] = "#C1665A"
        bg[PRELIGHT] = "#E0B6AF"
        bg[ACTIVE] = "#C1665A"
        bg[SELECTED] = "#C1665A"
        bg[INSENSITIVE] = "#884631"
}
widget "*error_widget*" style "error_style"

In my code I do gtk_widget_set_name( widget, "error_widget" ); to get
it drawn in the red style, and _set_name( "" ); to have it drawn in
the regular style.

Hope I've unserstood you.

John
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to