Commit 4f28f796 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

user: Use computed icon rectangle if SS_CENTERIMAGE style is set.

parent bedcdee7
...@@ -760,9 +760,11 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style ) ...@@ -760,9 +760,11 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
iconRect.right = iconRect.left + info->nWidth; iconRect.right = iconRect.left + info->nWidth;
iconRect.bottom = iconRect.top + info->nHeight; iconRect.bottom = iconRect.top + info->nHeight;
} }
else
iconRect = rc;
FillRect( hdc, &rc, hbrush ); FillRect( hdc, &rc, hbrush );
DrawIconEx( hdc, rc.left, rc.top, hIcon, rc.right - rc.left, DrawIconEx( hdc, iconRect.left, iconRect.top, hIcon, iconRect.right - iconRect.left,
rc.bottom - rc.top, 0, NULL, DI_NORMAL ); iconRect.bottom - iconRect.top, 0, NULL, DI_NORMAL );
} }
if (info) GlobalUnlock16(HICON_16(hIcon)); if (info) GlobalUnlock16(HICON_16(hIcon));
} }
......
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