fixing bug 150678 - native installer progress bar looks choppy. r=curt, sr=dveditz. affects windows platforms only
git-svn-id: svn://10.0.0.236/trunk@123101 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -178,6 +178,24 @@ char *GetErrorString(DWORD dwError, char *szErrorString, DWORD dwErrorStringSize
|
||||
return(szErrorString);
|
||||
}
|
||||
|
||||
/* function that clears the file progress bar of the xpinstall progress
|
||||
* dialog.
|
||||
*/
|
||||
void InvalidateBarberBarArea()
|
||||
{
|
||||
HWND hWndGauge;
|
||||
RECT rect;
|
||||
|
||||
/* get the file progress bar gauge */
|
||||
hWndGauge = GetDlgItem(dlgInfo.hWndDlg, IDC_GAUGE_FILE);
|
||||
/* get the dimensions of the gauge */
|
||||
GetClientRect(hWndGauge, &rect);
|
||||
/* invalidate the rect area of the gauge */
|
||||
InvalidateRect(hWndGauge, &rect, FALSE);
|
||||
/* update the dialog */
|
||||
UpdateWindow(dlgInfo.hWndDlg);
|
||||
}
|
||||
|
||||
HRESULT SmartUpdateJars()
|
||||
{
|
||||
DWORD dwIndex0;
|
||||
@@ -362,6 +380,7 @@ void cbXPIProgress(const char* msg, PRInt32 val, PRInt32 max)
|
||||
dlgInfo.nFileBars = 0;
|
||||
++dwCurrentArchive;
|
||||
UpdateGaugeArchiveProgressBar((unsigned)(((double)(dwCurrentArchive)/(double)dwTotalArchives)*(double)100));
|
||||
InvalidateBarberBarArea();
|
||||
bBarberBar = FALSE;
|
||||
}
|
||||
|
||||
@@ -434,7 +453,10 @@ UpdateGaugeFileBarber()
|
||||
hWndGauge = GetDlgItem(dlgInfo.hWndDlg, IDC_GAUGE_FILE);
|
||||
if(dwBarberDirection == BDIR_RIGHT)
|
||||
{
|
||||
if(lBarberCounter < 151)
|
||||
// 121 is the (number of bars) + (number bars in barber bar).
|
||||
// this number determines how far to the right to draw the barber bat
|
||||
// so as to make it look like it disappears off the progress meter area.
|
||||
if(lBarberCounter < 121)
|
||||
++lBarberCounter;
|
||||
else
|
||||
dwBarberDirection = BDIR_LEFT;
|
||||
|
||||
Reference in New Issue
Block a user