USER: use computed icon rectangle if SS_CENTERIMAGE style is set

Dmitry Timoshkov dmitry at codeweavers.com
Wed Sep 6 09:00:45 CDT 2006


Hello,

this patch makes my test application look identically under Wine and Windows.

Changelog:
    USER: use computed icon rectangle if SS_CENTERIMAGE style is set.

--- cvs/hq/wine/dlls/user/static.c	2006-08-15 14:51:51.000000000 +0900
+++ wine/dlls/user/static.c	2006-09-06 22:48:48.000000000 +0900
@@ -760,9 +760,11 @@ static void STATIC_PaintIconfn( HWND hwn
             iconRect.right = iconRect.left + info->nWidth;
             iconRect.bottom = iconRect.top + info->nHeight;
         }
+        else
+            iconRect = rc;
         FillRect( hdc, &rc, hbrush );
-        DrawIconEx( hdc, rc.left, rc.top, hIcon, rc.right - rc.left,
-                    rc.bottom - rc.top, 0, NULL, DI_NORMAL );
+        DrawIconEx( hdc, iconRect.left, iconRect.top, hIcon, iconRect.right - iconRect.left,
+                    iconRect.bottom - iconRect.top, 0, NULL, DI_NORMAL );
     }
     if (info) GlobalUnlock16(HICON_16(hIcon));
 }





More information about the wine-patches mailing list