mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
c5fb0d6dce
commit
451161837d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user