From 932697b836a0f2327f32c481e4e6cd5fedc28fe5 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sat, 3 Jan 2009 17:22:12 +0000 Subject: [PATCH] Made animation parabolic --- src/gui/widgets/timeline/timeline-layout-helper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/timeline/timeline-layout-helper.cpp b/src/gui/widgets/timeline/timeline-layout-helper.cpp index d6a4e5560..6a7b2239a 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.cpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.cpp @@ -245,7 +245,8 @@ TimelineLayoutHelper::layout_headers_recursive( // Now we have the branch_height, obscure tracks according to // the animation state - offset = offset - branch_height + branch_height * animation_state / Track::MaxExpandAnimation; + const float a = (1.0f - (float)animation_state / (float)Track::MaxExpandAnimation); + offset = offset - branch_height * a * a; TrackTree::pre_order_iterator descendant_iterator(iterator); descendant_iterator++; @@ -263,7 +264,6 @@ TimelineLayoutHelper::layout_headers_recursive( headerBoxes.erase(track); } - // Make sure the global animation state includes this branch's // animation state common_animation_state = max(