Commit f875314f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/header: Use cached colors instead of querying them again.

parent e6a3807e
...@@ -300,7 +300,7 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU ...@@ -300,7 +300,7 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
/* Set the colors before sending NM_CUSTOMDRAW so that it can change them */ /* Set the colors before sending NM_CUSTOMDRAW so that it can change them */
SetTextColor(hdc, (bHotTrack && !theme) ? COLOR_HIGHLIGHT : COLOR_BTNTEXT); SetTextColor(hdc, (bHotTrack && !theme) ? COLOR_HIGHLIGHT : COLOR_BTNTEXT);
SetBkColor(hdc, GetSysColor(COLOR_3DFACE)); SetBkColor(hdc, comctl32_color.clr3dFace);
if (lCDFlags & CDRF_NOTIFYITEMDRAW && !(phdi->fmt & HDF_OWNERDRAW)) if (lCDFlags & CDRF_NOTIFYITEMDRAW && !(phdi->fmt & HDF_OWNERDRAW))
{ {
...@@ -497,7 +497,7 @@ HEADER_DrawHotDivider(const HEADER_INFO *infoPtr, HDC hdc) ...@@ -497,7 +497,7 @@ HEADER_DrawHotDivider(const HEADER_INFO *infoPtr, HDC hdc)
RECT r; RECT r;
HEADER_GetHotDividerRect(infoPtr, &r); HEADER_GetHotDividerRect(infoPtr, &r);
brush = CreateSolidBrush(GetSysColor(COLOR_HIGHLIGHT)); brush = CreateSolidBrush(comctl32_color.clrHighlight);
FillRect(hdc, &r, brush); FillRect(hdc, &r, brush);
DeleteObject(brush); DeleteObject(brush);
} }
...@@ -2067,6 +2067,10 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) ...@@ -2067,6 +2067,10 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_SETREDRAW: case WM_SETREDRAW:
return HEADER_SetRedraw(infoPtr, wParam, lParam); return HEADER_SetRedraw(infoPtr, wParam, lParam);
case WM_SYSCOLORCHANGE:
COMCTL32_RefreshSysColors();
return 0;
default: default:
if ((msg >= WM_USER) && (msg < WM_APP) && !COMCTL32_IsReflectedMessage(msg)) if ((msg >= WM_USER) && (msg < WM_APP) && !COMCTL32_IsReflectedMessage(msg))
ERR("unknown msg %04x wp=%04lx lp=%08lx\n", ERR("unknown msg %04x wp=%04lx lp=%08lx\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment