mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 641942 - Make Windows progress bars RTL-friendly. r=jimm
This commit is contained in:
parent
68820b54b2
commit
acf3af443b
@ -1600,6 +1600,11 @@ RENDER_AGAIN:
|
||||
double tempValue;
|
||||
double ratio = modf(PR_IntervalToMilliseconds(PR_IntervalNow())/interval,
|
||||
&tempValue);
|
||||
// If the frame direction is RTL, we want to have the animation going RTL.
|
||||
// ratio is in [0.0; 1.0[ range, inverting it reverse the animation.
|
||||
if (IsFrameRTL(aFrame)) {
|
||||
ratio = 1.0 - ratio;
|
||||
}
|
||||
PRInt32 dx = static_cast<PRInt32>(animationWidth * ratio) - overlayWidth;
|
||||
|
||||
RECT overlayRect = widgetRect;
|
||||
|
Loading…
x
Reference in New Issue
Block a user