Module: wine Branch: refs/heads/master Commit: 608ddd4742417ebd20824771f47e1bc96289f204 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=608ddd4742417ebd20824771...
Author: Huw Davies huw@codeweavers.com Date: Mon Jul 31 15:38:14 2006 +0100
comctl32: Limit the size of the header bitmap to 49x49.
---
dlls/comctl32/propsheet.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 31590ee..8fead28 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -3269,15 +3269,16 @@ static LRESULT PROPSHEET_Paint(HWND hwnd } else { + int margin; hbr = GetSysColorBrush(COLOR_WINDOW); FillRect(hdc, &rzone, hbr);
/* Draw the header bitmap. It's always centered like a * common 49 x 49 bitmap. */ - BitBlt(hdc, rzone.right - 49 - ((rzone.bottom - 49) / 2), - (rzone.bottom - 49) / 2, - bm.bmWidth, bm.bmHeight, - hdcSrc, 0, 0, SRCCOPY); + margin = (rzone.bottom - 49) / 2; + BitBlt(hdc, rzone.right - 49 - margin, margin, + min(bm.bmWidth, 49), min(bm.bmHeight, 49), + hdcSrc, 0, 0, SRCCOPY);
/* NOTE: Native COMCTL32 draws a white stripe over the bitmap * if its height is smaller than 49 pixels. Because the reason