I'm writing custom GtkWidgets for a small library and therefore need custom style properties. I usually use the gtk_widget_class_install_style_property-function during the class-initialisation to do that. However I could not find a way to install a color-property, such as a GdkRGBA or a GdkColor for a widget. How could I do that?
Most of the available functions for installing or registering style-properties are deprecated since the move to the CssProvider for style-handling and it is sometimes hard to get the best way of handling with style-properties in gtk from the reference manuals.
Is there a different way to install such properties? Furthermore is there a documentation how the CssStyleProvider works internally and how properties are parsed from a css-file to the actual widget or GtkStyleContext?
You can do so with
However, I don't think there's anything you can do with a color-typed style property that you can't do better with just plain CSS.