Mike McCormack : user32: Remember to draw the icon when SS_CENTERIMAGE is set.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Aug 10 04:43:16 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 7aeefa305fcc80ce9a0c15d43680c82d69f09b1a
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=7aeefa305fcc80ce9a0c15d43680c82d69f09b1a

Author: Mike McCormack <mike at codeweavers.com>
Date:   Thu Aug 10 09:41:48 2006 +0900

user32: Remember to draw the icon when SS_CENTERIMAGE is set.

---

 dlls/user/static.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/dlls/user/static.c b/dlls/user/static.c
index f85415e..4eef677 100644
--- a/dlls/user/static.c
+++ b/dlls/user/static.c
@@ -121,7 +121,7 @@ static HICON STATIC_SetIcon( HWND hwnd, 
 {
     HICON prevIcon;
     CURSORICONINFO * info;
-    
+
     if ((style & SS_TYPEMASK) != SS_ICON) return 0;
     info = hicon?(CURSORICONINFO *) GlobalLock16(HICON_16(hicon)):NULL;
     if (hicon && !info) {
@@ -759,14 +759,10 @@ static void STATIC_PaintIconfn( HWND hwn
             iconRect.top = (rc.bottom - rc.top) / 2 - info->nHeight / 2;
             iconRect.right = iconRect.left + info->nWidth;
             iconRect.bottom = iconRect.top + info->nHeight;
-            FillRect( hdc, &rc, hbrush );
-        }
-        else
-        {
-            FillRect( hdc, &rc, hbrush );
-            DrawIconEx( hdc, rc.left, rc.top, hIcon, rc.right - rc.left,
-                        rc.bottom - rc.top, 0, NULL, DI_NORMAL );
         }
+        FillRect( hdc, &rc, hbrush );
+        DrawIconEx( hdc, rc.left, rc.top, hIcon, rc.right - rc.left,
+                    rc.bottom - rc.top, 0, NULL, DI_NORMAL );
     }
     if (info) GlobalUnlock16(HICON_16(hIcon));
 }




More information about the wine-cvs mailing list