Declaration [src]

gtk_widget_override_background_color (
  GtkWidget* widget,
  GtkStateFlags state,
  const GdkRGBA* color

Description [src]

Sets the background color to use for a widget.

All other style values are left untouched. See gtk_widget_override_color().

Available since:3.0
Deprecated since:3.16

This function is not useful in the context of CSS-based rendering. If you wish to change the way a widget renders its background you should use a custom CSS style, through an application-specific GtkStyleProvider and a CSS style class. You can also override the default drawing of a widget through the GtkWidget::draw signal, and use Cairo to draw a specific color, regardless of the CSS style.


state GtkStateFlags

The state for which to set the background color.

color GdkRGBA

The color to assign, or NULL to undo the effect of previous calls to gtk_widget_override_background_color()

 The argument can be NULL.
 The data is owned by the caller of the function.