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

@ -15,6 +15,8 @@ static void st_theme_node_finalize (GObject *object);
static const ClutterColor BLACK_COLOR = { 0, 0, 0, 0xff };
static const ClutterColor TRANSPARENT_COLOR = { 0, 0, 0, 0 };
extern gfloat st_slow_down_factor;
G_DEFINE_TYPE (StThemeNode, st_theme_node, G_TYPE_OBJECT)
static void
@ -1683,13 +1685,13 @@ st_theme_node_get_transition_duration (StThemeNode *node)
g_return_val_if_fail (ST_IS_THEME_NODE (node), 0);
if (node->transition_duration > -1)
return node->transition_duration;
return st_slow_down_factor * node->transition_duration;
st_theme_node_get_double (node, "transition-duration", FALSE, &value);
node->transition_duration = (int)value;
return node->transition_duration;
return st_slow_down_factor * node->transition_duration;
}
StTextDecoration