Commit cbe79616 authored by Filip Navara's avatar Filip Navara Committed by Alexandre Julliard

Use system metrics values in TOOLBAR_DrawPattern instead of hardcoded

values.
parent 62a48076
...@@ -632,9 +632,12 @@ TOOLBAR_DrawPattern (LPRECT lpRect, NMTBCUSTOMDRAW *tbcd) ...@@ -632,9 +632,12 @@ TOOLBAR_DrawPattern (LPRECT lpRect, NMTBCUSTOMDRAW *tbcd)
COLORREF clrBkOld; COLORREF clrBkOld;
INT cx = lpRect->right - lpRect->left; INT cx = lpRect->right - lpRect->left;
INT cy = lpRect->bottom - lpRect->top; INT cy = lpRect->bottom - lpRect->top;
INT cxEdge = GetSystemMetrics(SM_CXEDGE);
INT cyEdge = GetSystemMetrics(SM_CYEDGE);
clrTextOld = SetTextColor(hdc, tbcd->clrBtnHighlight); clrTextOld = SetTextColor(hdc, tbcd->clrBtnHighlight);
clrBkOld = SetBkColor(hdc, tbcd->clrBtnFace); clrBkOld = SetBkColor(hdc, tbcd->clrBtnFace);
PatBlt (hdc, lpRect->left + 2, lpRect->top + 2, cx - 4, cy - 4, PATCOPY); PatBlt (hdc, lpRect->left + cxEdge, lpRect->top + cyEdge,
cx - (2 * cxEdge), cy - (2 * cyEdge), PATCOPY);
SetBkColor(hdc, clrBkOld); SetBkColor(hdc, clrBkOld);
SetTextColor(hdc, clrTextOld); SetTextColor(hdc, clrTextOld);
SelectObject (hdc, hbr); SelectObject (hdc, hbr);
......
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