Ignacio Nodal <[EMAIL PROTECTED]> writes:
> Is this function the correct one to change the background color of my
> widgets?
> 
> void gtk_widget_set_style(GtkWidget *widget,GtkStyle *style);
> 
> I mean... modifying the "GdkColor bg[5]" field in the GtkStyle
> structure..
> 

No, should use the gtk_widget_modify_style() function instead:

  rc_style = gtk_rc_style_new ();
  rc_style->bg[GTK_STATE_NORMAL].red = 65535;
  rc_style->bg[GTK_STATE_NORMAL].green = 0;
  rc_style->bg[GTK_STATE_NORMAL].blue = 0;
  rc_style->color_flags[GTK_STATE_NORMAL] = GTK_RC_BG;
  gtk_widget_modify_style (drawing_area, rc_style);
  gtk_rc_style_unref (rc_style);

Havoc

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to