Bug 848692 - Fix native progress bar animation. r=josh

This commit is contained in:
Markus Stange 2013-03-08 09:03:39 +01:00
parent 4124568811
commit c6333bd007
2 changed files with 3 additions and 3 deletions

View File

@ -187,7 +187,7 @@ nsMacDockSupport::RedrawIcon()
int stepsPerSecond = isIndeterminate ? 60 : 30;
mProgressDrawInfo.trackInfo.progress.phase =
PR_IntervalToMilliseconds(PR_IntervalNow()) * stepsPerSecond / 1000 % 32;
uint8_t(PR_IntervalToMilliseconds(PR_IntervalNow()) * stepsPerSecond / 1000);
[icon lockFocus];
CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];

View File

@ -169,8 +169,8 @@ extern "C" {
int32_t stepsPerSecond = mIsIndeterminate ? 60 : 30;
int32_t milliSecondsPerStep = 1000 / stepsPerSecond;
tdi.trackInfo.progress.phase = PR_IntervalToMilliseconds(PR_IntervalNow()) /
milliSecondsPerStep % 32;
tdi.trackInfo.progress.phase = uint8_t(PR_IntervalToMilliseconds(PR_IntervalNow()) /
milliSecondsPerStep);
HIThemeDrawTrack(&tdi, NULL, cgContext, kHIThemeOrientationNormal);
}