From cbe79616bd3f44a2f63cc9508524732b819eae63 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 19 Jul 2004 19:32:16 +0000 Subject: [PATCH] Use system metrics values in TOOLBAR_DrawPattern instead of hardcoded values. --- dlls/comctl32/toolbar.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 3677de7340..ac1205212c 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -632,9 +632,12 @@ TOOLBAR_DrawPattern (LPRECT lpRect, NMTBCUSTOMDRAW *tbcd) COLORREF clrBkOld; INT cx = lpRect->right - lpRect->left; INT cy = lpRect->bottom - lpRect->top; + INT cxEdge = GetSystemMetrics(SM_CXEDGE); + INT cyEdge = GetSystemMetrics(SM_CYEDGE); clrTextOld = SetTextColor(hdc, tbcd->clrBtnHighlight); 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); SetTextColor(hdc, clrTextOld); SelectObject (hdc, hbr); -- 2.32.0.93.g670b81a890