Package: gtk

Function gtk:style-context-add-class

Lambda List

gtk:style-context-add-class (context classname)

Arguments

context -- a gtk:style-context object
classname -- a string with a class name to use in styling

Details

Adds a style class to the style context, so later uses of the style context will make use of this new class for styling.

Examples

In the CSS file format, a GtkEntry defining an "entry" class, would be matched by:
GtkEntry.entry { ... }  
While any widget defining an "entry" class would be matched by:
.entry { ... }    

Warning

This function is deprecated since 4.10. Use the gtk:widget-add-css-class function instead.
 

See also

#2023-9-17