cssanimation: Fix animation-direction handling
"alternate" was behaving as "alternate-reverse" and vice versa.
This commit is contained in:
@ -87,15 +87,15 @@ gtk_css_animation_get_progress_from_iteration (GtkCssAnimation *animation,
|
|||||||
case GTK_CSS_DIRECTION_ALTERNATE:
|
case GTK_CSS_DIRECTION_ALTERNATE:
|
||||||
d = floor (iteration);
|
d = floor (iteration);
|
||||||
if (fmod (d, 2))
|
if (fmod (d, 2))
|
||||||
return iteration - d;
|
|
||||||
else
|
|
||||||
return 1 + d - iteration;
|
return 1 + d - iteration;
|
||||||
|
else
|
||||||
|
return iteration - d;
|
||||||
case GTK_CSS_DIRECTION_ALTERNATE_REVERSE:
|
case GTK_CSS_DIRECTION_ALTERNATE_REVERSE:
|
||||||
d = floor (iteration);
|
d = floor (iteration);
|
||||||
if (fmod (d, 2))
|
if (fmod (d, 2))
|
||||||
return 1 + d - iteration;
|
|
||||||
else
|
|
||||||
return iteration - d;
|
return iteration - d;
|
||||||
|
else
|
||||||
|
return 1 + d - iteration;
|
||||||
default:
|
default:
|
||||||
g_return_val_if_reached (0);
|
g_return_val_if_reached (0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user