Commit 80db4f9c authored by Benjamin Otte's avatar Benjamin Otte

cssanimation: Fix animation-direction handling

"alternate" was behaving as "alternate-reverse" and vice versa.
parent b6aecca7
......@@ -87,15 +87,15 @@ gtk_css_animation_get_progress_from_iteration (GtkCssAnimation *animation,
case GTK_CSS_DIRECTION_ALTERNATE:
d = floor (iteration);
if (fmod (d, 2))
return iteration - d;
else
return 1 + d - iteration;
else
return iteration - d;
case GTK_CSS_DIRECTION_ALTERNATE_REVERSE:
d = floor (iteration);
if (fmod (d, 2))
return 1 + d - iteration;
else
return iteration - d;
else
return 1 + d - iteration;
default:
g_return_val_if_reached (0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment