mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
fixing bug 150678 - native installer progress bar looks choppy. r=curt, sr=dveditz. affects windows platforms only
This commit is contained in:
parent
0815789c7a
commit
40f81e9c4f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user