always accept transitions for items without QQuickItem::ItemHasContents

This commit is contained in:
Uwe Rathmann 2023-10-16 19:19:38 +02:00
parent 7cf88e7b45
commit 3b5e6aa0fd

View File

@ -1259,13 +1259,19 @@ bool QskSkinnable::isTransitionAccepted( QskAspect aspect ) const
{
Q_UNUSED( aspect )
/*
Usually we only need smooth transitions, when state changes
happen while the skinnable is visible. There are few exceptions
like QskPopup::Closed, that is used to slide/fade in.
*/
if ( auto control = qskControlCast( owningItem() ) )
return control->isInitiallyPainted();
{
/*
Usually we only need smooth transitions, when state changes
happen while the skinnable is visible. There are few exceptions
like QskPopup::Closed, that is used to slide/fade in.
*/
if ( control->flags() & QQuickItem::ItemHasContents )
return control->isInitiallyPainted();
return true;
}
return false;
}