state dependent animator hints fixed

This commit is contained in:
Uwe Rathmann 2018-02-06 14:58:24 +01:00
parent d32646c67c
commit 1ad514dcdd
3 changed files with 6 additions and 6 deletions

View File

@ -81,7 +81,7 @@ namespace
m_to = to;
const auto hint = m_scrollView->effectiveAnimation(
QskAspect::Metric, QskScrollView::Viewport );
QskAspect::Metric, QskScrollView::Viewport, QskAspect::NoState );
setDuration( hint.duration );
setEasingCurve( hint.type );

View File

@ -363,9 +363,9 @@ QskAnimationHint QskSkinnable::animation(
QskAnimationHint QskSkinnable::effectiveAnimation(
QskAspect::Type type, QskAspect::Subcontrol subControl,
QskSkinHintStatus* status ) const
QskAspect::State state, QskSkinHintStatus* status ) const
{
QskAspect::Aspect aspect = subControl | type;
QskAspect::Aspect aspect = subControl | type | state;
aspect.setAnimator( true );
QskAnimationHint hint;
@ -711,7 +711,7 @@ void QskSkinnable::startTransition( QskAspect::Aspect aspect,
aspect.setPlacement( effectivePlacement() );
#if DEBUG_ANIMATOR
qDebug() << aspect;
qDebug() << aspect << animationHint.duration;
#endif
auto animator = m_data->animators.animator( aspect );
@ -754,7 +754,7 @@ void QskSkinnable::setSkinStateFlag( QskAspect::State state, bool on )
{
const auto type = static_cast< Type >( i );
const auto hint = effectiveAnimation( type, subControl );
const auto hint = effectiveAnimation( type, subControl, newState );
if ( hint.duration > 0 )
{

View File

@ -115,7 +115,7 @@ public:
QskAnimationHint animation( QskAspect::Aspect, QskSkinHintStatus* = nullptr ) const;
QskAnimationHint effectiveAnimation( QskAspect::Type, QskAspect::Subcontrol,
QskSkinHintStatus* status = nullptr ) const;
QskAspect::State, QskSkinHintStatus* status = nullptr ) const;
QVariant effectiveHint( QskAspect::Aspect, QskSkinHintStatus* = nullptr ) const;
virtual QskAspect::Placement effectivePlacement() const;