Test the widget state to get the correct background colour.

When the cell borders are not displayed, the border colour is set to
the background colour so test for the widget being in an insensitive
state to get the correct background colour.
This commit is contained in:
Robert Fewell 2017-11-01 12:17:19 +00:00
parent c5fb0d6dce
commit 451161837d

View File

@ -418,7 +418,10 @@ draw_cell (GnucashSheet *sheet,
gtk_render_background (stylectxt, cr, x, y, width, height);
gdk_rgba_parse (&color, "black");
gnc_style_context_get_background_color (stylectxt, GTK_STATE_FLAG_NORMAL, &color);
if (gtk_style_context_get_state (stylectxt) == GTK_STATE_FLAG_INSENSITIVE)
gnc_style_context_get_background_color (stylectxt, GTK_STATE_FLAG_INSENSITIVE, &color);
else
gnc_style_context_get_background_color (stylectxt, GTK_STATE_FLAG_NORMAL, &color);
bg_color = &color;
get_cell_borders (sheet, virt_loc, &borders);