Commit ab4438e2 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

comctl32: Invalidate the entire progress bar any time it changes.

parent dc2cdf13
...@@ -131,35 +131,12 @@ static inline int get_bar_position( PROGRESS_INFO *infoPtr, LONG style, ...@@ -131,35 +131,12 @@ static inline int get_bar_position( PROGRESS_INFO *infoPtr, LONG style,
/*********************************************************************** /***********************************************************************
* PROGRESS_Invalidate * PROGRESS_Invalidate
* *
* Invalide the range between old and new pos. * Don't be too clever about invalidating the progress bar.
* Installshield depends on this simple behaviour.
*/ */
static void PROGRESS_Invalidate( PROGRESS_INFO *infoPtr, INT old, INT new ) static void PROGRESS_Invalidate( PROGRESS_INFO *infoPtr, INT old, INT new )
{ {
LONG style = GetWindowLongW (infoPtr->Self, GWL_STYLE); InvalidateRect( infoPtr->Self, NULL, old > new );
RECT rect;
int oldPos, newPos;
BOOL barSmooth = (style & PBS_SMOOTH) && !GetWindowTheme (infoPtr->Self);
get_client_rect( infoPtr->Self, &rect );
oldPos = get_bar_position( infoPtr, style, &rect, old );
newPos = get_bar_position( infoPtr, style, &rect, new );
if (style & PBS_VERTICAL)
{
rect.top = rect.bottom - max( oldPos, newPos );
rect.bottom = rect.bottom - min( oldPos, newPos );
if (!barSmooth) rect.top -=
get_led_size (infoPtr, style, &rect) + get_led_gap (infoPtr);
}
else
{
rect.left = min( oldPos, newPos );
rect.right = max( oldPos, newPos );
if (!barSmooth) rect.right +=
get_led_size (infoPtr, style, &rect) + get_led_gap (infoPtr);
}
InvalidateRect( infoPtr->Self, &rect, oldPos > newPos );
} }
/* Information for a progress bar drawing helper */ /* Information for a progress bar drawing helper */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment