[gtk+] cssanimation: Fix animation-direction handling
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssanimation: Fix animation-direction handling
- Date: Mon, 7 Jul 2014 18:07:21 +0000 (UTC)
commit 80db4f9ce7678a7211e72fb3ed32d55a6e1d8f95
Author: Benjamin Otte <otte redhat com>
Date: Mon Jul 7 20:04:34 2014 +0200
cssanimation: Fix animation-direction handling
"alternate" was behaving as "alternate-reverse" and vice versa.
gtk/gtkcssanimation.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkcssanimation.c b/gtk/gtkcssanimation.c
index ef5e79a..df2e609 100644
--- a/gtk/gtkcssanimation.c
+++ b/gtk/gtkcssanimation.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]