Declaration [src]

gtk_widget_modify_style (
  GtkWidget* widget,
  GtkRcStyle* style

Description [src]

Modifies style values on the widget.

Modifications made using this technique take precedence over style values set via an RC file, however, they will be overridden if a style is explicitly set on the widget using gtk_widget_set_style(). The GtkRcStyle-struct is designed so each field can either be set or unset, so it is possible, using this function, to modify some style values and leave the others unchanged.

Note that modifications made with this function are not cumulative with previous calls to gtk_widget_modify_style() or with such functions as gtk_widget_modify_fg(). If you wish to retain previous values, you must first call gtk_widget_get_modifier_style(), make your modifications to the returned style, then call gtk_widget_modify_style() with that style. On the other hand, if you first call gtk_widget_modify_style(), subsequent calls to such functions gtk_widget_modify_fg() will have a cumulative effect with the initial modifications.

Deprecated since:3.0

Use GtkStyleContext with a custom GtkStyleProvider instead.


style GtkRcStyle

The GtkRcStyle-struct holding the style modifications.

 The data is owned by the caller of the function.