From d9e25f9c8b8a26db5bd6541035d2328a09e11087 Mon Sep 17 00:00:00 2001 From: William Poetra Yoga H Date: Mon, 8 Nov 2004 22:11:48 +0000 Subject: [PATCH] Fix the size and position of the system menu icon on the caption bar. --- windows/nonclient.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/windows/nonclient.c b/windows/nonclient.c index 30aa7678860..d479c5a6742 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c @@ -655,9 +655,9 @@ BOOL NC_DrawSysButton (HWND hwnd, HDC hdc, BOOL down) { RECT rect; NC_GetInsideRect( hwnd, &rect ); - DrawIconEx (hdc, rect.left + 1, rect.top + 1, hIcon, - GetSystemMetrics(SM_CXSIZE) - 1, - GetSystemMetrics(SM_CYSIZE) - 1, 0, 0, DI_NORMAL); + DrawIconEx (hdc, rect.left + 2, rect.top + 1, hIcon, + GetSystemMetrics(SM_CXSMICON), + GetSystemMetrics(SM_CYSMICON), 0, 0, DI_NORMAL); } return (hIcon != 0); } @@ -871,7 +871,7 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd, DWORD style, if ((style & WS_SYSMENU) && !(exStyle & WS_EX_TOOLWINDOW)) { if (NC_DrawSysButton (hwnd, hdc, FALSE)) - r.left += GetSystemMetrics(SM_CYCAPTION) - 1; + r.left += GetSystemMetrics(SM_CXSMICON) + 2; } if (style & WS_SYSMENU)