Progress bar painting fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




ChangeLog:
* invalidate the whole progress bar when painting (for Dreamweaver's install)


Index: dlls/comctl32/progress.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/progress.c,v
retrieving revision 1.31
diff -u -r1.31 progress.c
--- dlls/comctl32/progress.c	11 May 2003 02:38:05 -0000	1.31
+++ dlls/comctl32/progress.c	17 Jul 2003 21:25:34 -0000
@@ -62,37 +62,14 @@
  */
 static void PROGRESS_Invalidate( PROGRESS_INFO *infoPtr, INT old, INT new )
 {
-    LONG style = GetWindowLongW (infoPtr->Self, GWL_STYLE);
     RECT rect;
-    int oldPos, newPos, ledWidth;
 
+    /*
+     * To make sure the number is painted correctly, we must invalidate
+     * the whole progress bar.
+     */
     GetClientRect (infoPtr->Self, &rect);
-    InflateRect(&rect, -1, -1);
-
-    if (style & PBS_VERTICAL)
-    {
-        oldPos = rect.bottom - MulDiv (old - infoPtr->MinVal, rect.bottom - rect.top,
-                                       infoPtr->MaxVal - infoPtr->MinVal);
-        newPos = rect.bottom - MulDiv (new - infoPtr->MinVal, rect.bottom - rect.top,
-                                       infoPtr->MaxVal - infoPtr->MinVal);
-        ledWidth = MulDiv (rect.right - rect.left, 2, 3);
-        rect.top = min( oldPos, newPos );
-        rect.bottom = max( oldPos, newPos );
-        if (!(style & PBS_SMOOTH)) rect.top -= ledWidth;
-        InvalidateRect( infoPtr->Self, &rect, oldPos < newPos );
-    }
-    else
-    {
-        oldPos = rect.left + MulDiv (old - infoPtr->MinVal, rect.right - rect.left,
-                                     infoPtr->MaxVal - infoPtr->MinVal);
-        newPos = rect.left + MulDiv (new - infoPtr->MinVal, rect.right - rect.left,
-                                     infoPtr->MaxVal - infoPtr->MinVal);
-        ledWidth = MulDiv (rect.bottom - rect.top, 2, 3);
-        rect.left = min( oldPos, newPos );
-        rect.right = max( oldPos, newPos );
-        if (!(style & PBS_SMOOTH)) rect.right += ledWidth;
-        InvalidateRect( infoPtr->Self, &rect, oldPos > newPos );
-    }
+    InvalidateRect( infoPtr->Self, &rect, TRUE);
 }
 
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux