Issue with css and gtk+-3.20



Hi,

The code we use in gnumeric for theming does not work anymore ith gtk+-
3.20, more specifically, if I use css code such as:

GnmItemCursor {
 color="black";
 background-color="white"; }

GnmItemCursor.ant {
 color="blue";
 background-color="red"; }

when retrieving the colors with the context for a GnmItemCursor with no class, I get the appropriate colors, 
but using:

gtk_style_context_save (context);
gtk_style_context_add_class (context, "ant");
gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL);
gtk_style_context_get (context, gtk_style_context_get_state(context),
                       "color", &fore,
                       "background-color", &back,
                       NULL);
gtk_style_context_restore(context);


fore is still black, but back is changed to (r,g,b,a) = (0,0,0,0). Both colors are not what is expected, 
especially the background which is not even inherited from the classless context.

if instead the css has:

.ant {
 color="blue";
 background-color="red"; }

things work, but the style should be restricted to GnmItemCursor, not everything having an "ant" class. What 
are we doing wrong? Things used to work with previous Gtk+ versions.

Regards,
Jean




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