Styling Widgets

Dear all,

I want to create widgets whose styles change repeatedly during the execution of my programme (mainly changes to gradiented backgrounds). I'm currently doing this using a GtkCssProvider and the load_from_data function. I've noticed that if I just call gtk_css_provider_load_from_data to change the stlye then my widgets don't change. However, if I remove and re-add the CssProvider to the GtkStyleContext each time I want to change the style then everything works fine.

Is this the correct way to do this, or is there a better way to make the style context update when I update my styleprovider?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]