diff --git a/src/gui/widgets/timeline/timeline-header-container.cpp b/src/gui/widgets/timeline/timeline-header-container.cpp index d2bcef5ba..cd00a97cc 100644 --- a/src/gui/widgets/timeline/timeline-header-container.cpp +++ b/src/gui/widgets/timeline/timeline-header-container.cpp @@ -457,9 +457,35 @@ TimelineHeaderContainer::draw_header_decoration( else if(hoveringExpander == timeline_track) state_type = STATE_PRELIGHT; - const ExpanderStyle expander_style = - timeline_track->get_expanded() ? + ExpanderStyle expander_style; + const int animation_state = + timeline_track->get_expand_animation_state(); + + if(animation_state == Track::NoAnimationState) + expander_style = timeline_track->get_expanded() ? EXPANDER_EXPANDED : EXPANDER_COLLAPSED; + else + { + const int notch = Track::MaxExpandAnimation / 3; + if(timeline_track->get_expanded()) + { + if(animation_state >= notch * 2) + expander_style = EXPANDER_SEMI_EXPANDED; + else if(animation_state >= notch) + expander_style = EXPANDER_SEMI_COLLAPSED; + else + expander_style = EXPANDER_COLLAPSED; + } + else + { + if(animation_state <= notch) + expander_style = EXPANDER_COLLAPSED; + else if(animation_state <= notch * 2) + expander_style = EXPANDER_SEMI_COLLAPSED; + else + expander_style = EXPANDER_SEMI_EXPANDED; + } + } if(!model_track->get_child_tracks().empty()) style->paint_expander (gdkWindow,