Skip to content

Commit

Permalink
always accept transitions for items without QQuickItem::ItemHasContents
Browse files Browse the repository at this point in the history
  • Loading branch information
uwerat committed Oct 16, 2023
1 parent 7cf88e7 commit 3b5e6aa
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/controls/QskSkinnable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3b5e6aa

Please sign in to comment.