Win32GUI: Fix bug with specifying no color for status hilite.

We were mapping NO_COLOR to white instead of the default foreground color.
This commit is contained in:
Bart House
2017-10-08 17:33:20 -07:00
committed by Pasi Kallinen
parent b1f7bd3791
commit 7c24b420a9

View File

@@ -275,7 +275,8 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
else if (atr & HL_DIM)
fntatr = ATR_DIM;
fnt = mswin_get_font(NHW_STATUS, fntatr, hdc, FALSE);
nFg = (clr >= 0 && clr < CLR_MAX) ? nhcolor_to_RGB(clr) : Fg;
nFg = (clr == NO_COLOR ? Fg :
((clr >= 0 && clr < CLR_MAX) ? nhcolor_to_RGB(clr) : Fg));
nBg = Bg;
GetTextExtentPoint32(hdc, wbuf, vlen, &sz);