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

comctl32/syslink: Use cached colors for SysLink.

parent 745f4815
...@@ -831,7 +831,7 @@ static LRESULT SYSLINK_Draw (const SYSLINK_INFO *infoPtr, HDC hdc) ...@@ -831,7 +831,7 @@ static LRESULT SYSLINK_Draw (const SYSLINK_INFO *infoPtr, HDC hdc)
hOldFont = SelectObject(hdc, infoPtr->Font); hOldFont = SelectObject(hdc, infoPtr->Font);
OldTextColor = SetTextColor(hdc, infoPtr->TextColor); OldTextColor = SetTextColor(hdc, infoPtr->TextColor);
OldBkColor = SetBkColor(hdc, GetSysColor(COLOR_BTNFACE)); OldBkColor = SetBkColor(hdc, comctl32_color.clrBtnFace);
GetClientRect(infoPtr->Self, &rc); GetClientRect(infoPtr->Self, &rc);
rc.right -= SL_RIGHTMARGIN + SL_LEFTMARGIN; rc.right -= SL_RIGHTMARGIN + SL_LEFTMARGIN;
...@@ -1729,9 +1729,9 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, ...@@ -1729,9 +1729,9 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
infoPtr->Items = NULL; infoPtr->Items = NULL;
infoPtr->HasFocus = FALSE; infoPtr->HasFocus = FALSE;
infoPtr->MouseDownID = -1; infoPtr->MouseDownID = -1;
infoPtr->TextColor = GetSysColor(COLOR_WINDOWTEXT); infoPtr->TextColor = comctl32_color.clrWindowText;
infoPtr->LinkColor = GetSysColor(COLOR_HIGHLIGHT); infoPtr->LinkColor = comctl32_color.clrHighlight;
infoPtr->VisitedColor = GetSysColor(COLOR_HIGHLIGHT); infoPtr->VisitedColor = comctl32_color.clrHighlight;
infoPtr->BreakChar = ' '; infoPtr->BreakChar = ' ';
TRACE("SysLink Ctrl creation, hwnd=%p\n", hwnd); TRACE("SysLink Ctrl creation, hwnd=%p\n", hwnd);
SYSLINK_SetText(infoPtr, ((LPCREATESTRUCTW)lParam)->lpszName); SYSLINK_SetText(infoPtr, ((LPCREATESTRUCTW)lParam)->lpszName);
...@@ -1746,6 +1746,10 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, ...@@ -1746,6 +1746,10 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
Free (infoPtr); Free (infoPtr);
return 0; return 0;
case WM_SYSCOLORCHANGE:
COMCTL32_RefreshSysColors();
return 0;
default: default:
HandleDefaultMessage: HandleDefaultMessage:
if ((message >= WM_USER) && (message < WM_APP) && !COMCTL32_IsReflectedMessage(message)) if ((message >= WM_USER) && (message < WM_APP) && !COMCTL32_IsReflectedMessage(message))
......
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