Move Tweener.slowDownFactor into St

It has probably crossed the line to evil by a mile or so, but here
it is: a Tweener.slowDownFactor replacement used by all animations
without exception.
While at it, update Tweener to use the new setTimeScale() upstream
function instead of adjusting the timeline directly.

https://bugzilla.gnome.org/show_bug.cgi?id=622249
This commit is contained in:
Florian Müllner
2010-06-20 04:16:06 +02:00
parent 4b1fea2fa4
commit 35764fa09e
7 changed files with 53 additions and 21 deletions

View File

@ -106,6 +106,8 @@ enum
static guint signals[LAST_SIGNAL] = { 0, };
extern gfloat st_slow_down_factor;
static gboolean
handle_button_press_event_cb (ClutterActor *actor,
ClutterButtonEvent *event,
@ -875,7 +877,7 @@ trough_paging_cb (StScrollBar *self)
* idea, but it's a lot less involved than extenind the current animation */
a = self->priv->paging_animation = g_object_new (CLUTTER_TYPE_ANIMATION,
"object", self->priv->adjustment,
"duration", PAGING_SUBSEQUENT_REPEAT_TIMEOUT,
"duration", (guint)(PAGING_SUBSEQUENT_REPEAT_TIMEOUT * st_slow_down_factor),
"mode", mode,
NULL);
g_value_init (&v, G_TYPE_DOUBLE);
@ -961,7 +963,7 @@ stepper_move_on (StScrollBarPrivate *priv,
a = g_object_new (CLUTTER_TYPE_ANIMATION,
"object", priv->adjustment,
"duration", PAGING_SUBSEQUENT_REPEAT_TIMEOUT,
"duration", (guint)(PAGING_SUBSEQUENT_REPEAT_TIMEOUT * st_slow_down_factor),
"mode", mode,
NULL);