diff -r e54611453d29 -r e8e548922e31 brewpanel/sdlgui.c --- a/brewpanel/sdlgui.c Thu Nov 19 21:17:26 2015 +0100 +++ b/brewpanel/sdlgui.c Thu Nov 19 22:50:17 2015 +0100 @@ -38,6 +38,8 @@ static SDL_Rect dlgrect, bgrect; static int fontwidth, fontheight; /* Width & height of the actual font */ TTF_Font *pFont = NULL; /* TTF font for buttons etc. */ +static Uint32 LCDbg0 = 0; /* LCD background dark */ +static Uint32 LCDbg1 = 0; /* LCD background light */ extern int my_shutdown; @@ -251,9 +253,9 @@ Uint32 bg; if (bLight) - bg = SDL_MapRGB(pSdlGuiScrn->format,156,235, 4); + bg = LCDbg1; else - bg = SDL_MapRGB(pSdlGuiScrn->format, 94,147, 69); + bg = LCDbg0; sr.x=fontwidth*(c%16); sr.y=fontheight*(c/16); @@ -317,11 +319,11 @@ { SDL_Rect rect; int x, y, w, h, offset, border = 4; - Uint32 bg0 = SDL_MapRGB(pSdlGuiScrn->format, 94,147, 69); - Uint32 bg1 = SDL_MapRGB(pSdlGuiScrn->format,156,235, 4); Uint32 bc = SDL_MapRGB(pSdlGuiScrn->format, 32, 32, 32); Uint32 bg; + LCDbg0 = SDL_MapRGB(pSdlGuiScrn->format, 94,147, 69); + LCDbg1 = SDL_MapRGB(pSdlGuiScrn->format,156,235, 4); /* * Width and height are given in character columns and rows, * so calculate the display size in pixels. @@ -345,9 +347,9 @@ } if (bdlg[objnum].state & SG_SELECTED) { - bg = bg1; + bg = LCDbg1; } else { - bg = bg0; + bg = LCDbg0; } /* The root box should be bigger than the screen, so we disable the offset there: */