mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 17:49:39 +00:00
user: Use computed icon rectangle if SS_CENTERIMAGE style is set.
This commit is contained in:
parent
bedcdee714
commit
4f28f7967d
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue