scrollbar: fix SBS_SIZEBOX*ALIGN

Huw D M Davies h.davies1 at physics.ox.ac.uk
Tue Dec 2 05:28:03 CST 2003


        Huw Davies <huw at codeweavers.com>
        Only honour SBS_SIZEBOX*ALIGN styles if SBS_SIZE{GRIP,BOX} is set.
-- 
Huw Davies
huw at codeweavers.com
Index: controls/scroll.c
===================================================================
RCS file: /home/wine/wine/controls/scroll.c,v
retrieving revision 1.72
diff -u -r1.72 scroll.c
--- controls/scroll.c	2 Dec 2003 05:27:54 -0000	1.72
+++ controls/scroll.c	2 Dec 2003 11:23:39 -0000
@@ -1278,17 +1278,16 @@
     }
 
 
-    if (lpCreate->style & SBS_SIZEBOXTOPLEFTALIGN)
+    if (lpCreate->style & (SBS_SIZEGRIP | SBS_SIZEBOX))
     {
-        MoveWindow( hwnd, lpCreate->x, lpCreate->y, GetSystemMetrics(SM_CXVSCROLL)+1,
-                    GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
-    }
-    else if(lpCreate->style & SBS_SIZEBOXBOTTOMRIGHTALIGN)
-    {
-        MoveWindow( hwnd, lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1, 
-                    lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1,
-                    GetSystemMetrics(SM_CXVSCROLL)+1,
-                    GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
+        if (lpCreate->style & SBS_SIZEBOXTOPLEFTALIGN)
+            MoveWindow( hwnd, lpCreate->x, lpCreate->y, GetSystemMetrics(SM_CXVSCROLL)+1,
+                        GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
+        else if(lpCreate->style & SBS_SIZEBOXBOTTOMRIGHTALIGN)
+            MoveWindow( hwnd, lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1, 
+                        lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1,
+                        GetSystemMetrics(SM_CXVSCROLL)+1,
+                        GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
     }
     else if (lpCreate->style & SBS_VERT)
     {



More information about the wine-patches mailing list