starting state transitions for specific subcontrols supported
This commit is contained in:
parent
a12de7a200
commit
a88a1b7a50
|
@ -1382,7 +1382,19 @@ void QskSkinnable::setSkinStates( QskAspect::States newStates )
|
|||
bool QskSkinnable::startHintTransitions(
|
||||
QskAspect::States oldStates, QskAspect::States newStates, int index )
|
||||
{
|
||||
if ( !isTransitionAccepted( QskAspect() ) )
|
||||
QVector< QskAspect::Subcontrol > subControls;
|
||||
|
||||
if ( const auto control = qskControlCast( owningItem() ) )
|
||||
subControls = control->subControls();
|
||||
|
||||
return startHintTransitions( subControls, oldStates, newStates, index );
|
||||
}
|
||||
|
||||
bool QskSkinnable::startHintTransitions(
|
||||
const QVector< QskAspect::Subcontrol >& subControls,
|
||||
QskAspect::States oldStates, QskAspect::States newStates, int index )
|
||||
{
|
||||
if ( !isTransitionAccepted( QskAspect() ) || subControls.isEmpty() )
|
||||
{
|
||||
// the control does not like any animated transition at the moment
|
||||
return false;
|
||||
|
@ -1401,7 +1413,6 @@ bool QskSkinnable::startHintTransitions(
|
|||
|
||||
const auto primitiveCount = QskAspect::primitiveCount();
|
||||
|
||||
const auto subControls = control->subControls();
|
||||
for ( const auto subControl : subControls )
|
||||
{
|
||||
aspect.setSubcontrol( subControl );
|
||||
|
|
|
@ -260,6 +260,8 @@ class QSK_EXPORT QskSkinnable
|
|||
const QskSkinHintTable& hintTable() const;
|
||||
|
||||
bool startHintTransitions( QskAspect::States, QskAspect::States, int index = -1 );
|
||||
bool startHintTransitions( const QVector< QskAspect::Subcontrol >&,
|
||||
QskAspect::States, QskAspect::States, int index = -1 );
|
||||
|
||||
protected:
|
||||
virtual void updateNode( QSGNode* );
|
||||
|
|
Loading…
Reference in New Issue