/* For elasticity */
gboolean elastic;
- guint bounce_source;
ClutterAlpha *bounce_alpha;
};
stop_interpolation (TidyAdjustment *adjustment)
{
TidyAdjustmentPrivate *priv = adjustment->priv;
-
if (priv->interpolation)
{
clutter_timeline_stop (priv->interpolation);
priv->bounce_alpha = NULL;
}
}
-
- if (priv->bounce_source)
- {
- g_source_remove (priv->bounce_source);
- priv->bounce_source = 0;
- }
}
static void
TidyAdjustmentPrivate *priv = adjustment->priv;
priv->interpolation = NULL;
- if (priv->elastic)
+ if (priv->elastic && priv->bounce_alpha)
{
gdouble progress = clutter_alpha_get_alpha (priv->bounce_alpha) /
(gdouble)CLUTTER_ALPHA_MAX_ALPHA;
struct _TidyScrollViewPrivate
{
ClutterActor *child;
-
- TidyAdjustment *hadjustment;
- TidyAdjustment *vadjustment;
};
enum {
/* Notify that child has been set */
g_signal_emit_by_name (container, "actor-added", priv->child);
g_object_notify (G_OBJECT (container), "child");
-
+
clutter_actor_queue_relayout (CLUTTER_ACTOR (container));
}
else