mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 848692 - Fix native progress bar animation. r=josh
This commit is contained in:
parent
4124568811
commit
c6333bd007
@ -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];
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user