This fixes the alignment of updown components when no UDS_ALIGNLEFT or UDS_ALIGNRIGHT flags are set. It fixes newsbin. a+ Max Changelog: * Fix alignment of updown components when no UDS_ALIGNLEFT or UDS_ALIRIGHT flags are set -- Maxime Bellengà <maxime.bellenge@laposte.net>
Index: wine/dlls/comctl32/updown.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/updown.c,v retrieving revision 1.48 diff -u -r1.48 updown.c --- wine/dlls/comctl32/updown.c 2 Dec 2002 18:10:59 -0000 1.48 +++ wine/dlls/comctl32/updown.c 23 May 2003 15:33:29 -0000 @@ -193,7 +193,7 @@ /* now figure out if we need a space away from the buddy */ if ( IsWindow(infoPtr->Buddy) ) { if (dwStyle & UDS_ALIGNLEFT) rect->right -= DEFAULT_BUDDYSPACER; - else rect->left += DEFAULT_BUDDYSPACER; + else if (dwStyle & UDS_ALIGNRIGHT) rect->left += DEFAULT_BUDDYSPACER; } /* @@ -499,8 +499,6 @@ } else if (dwStyle & UDS_ALIGNRIGHT) { budRect.right -= DEFAULT_WIDTH + DEFAULT_XSEP; x = budRect.right+DEFAULT_XSEP; - } else { - x = budRect.right+DEFAULT_XSEP; } /* first adjust the buddy to accomodate the up/down */ @@ -525,7 +523,8 @@ x -= DEFAULT_BUDDYBORDER; } - SetWindowPos(infoPtr->Self, infoPtr->Buddy, x, + if ((dwStyle & UDS_ALIGNLEFT) || (dwStyle & UDS_ALIGNRIGHT)) + SetWindowPos(infoPtr->Self, infoPtr->Buddy, x, budRect.top - DEFAULT_ADDTOP, width, budRect.bottom - budRect.top + DEFAULT_ADDTOP + DEFAULT_ADDBOT, SWP_NOACTIVATE);