QskAspect::hasState added
This commit is contained in:
parent
95d8d2a6da
commit
726aca98df
@ -154,6 +154,7 @@ class QSK_EXPORT QskAspect
|
||||
|
||||
void setState( State ) noexcept;
|
||||
void addState( State ) noexcept;
|
||||
constexpr bool hasState() const noexcept;
|
||||
void clearState( State ) noexcept;
|
||||
void clearStates() noexcept;
|
||||
|
||||
@ -359,6 +360,11 @@ inline void QskAspect::addState( State state ) noexcept
|
||||
m_bits.states |= state;
|
||||
}
|
||||
|
||||
inline constexpr bool QskAspect::hasState() const noexcept
|
||||
{
|
||||
return m_bits.states;
|
||||
}
|
||||
|
||||
inline void QskAspect::clearState( State state ) noexcept
|
||||
{
|
||||
m_bits.states &= ~state;
|
||||
|
@ -609,7 +609,7 @@ bool QskSkinnable::resetSkinHint( QskAspect aspect )
|
||||
auto a = aspect;
|
||||
a.setPlacement( effectivePlacement() );
|
||||
|
||||
if ( a.state() == QskAspect::NoState )
|
||||
if ( !a.hasState() )
|
||||
a.setState( skinState() );
|
||||
|
||||
const auto oldHint = storedHint( a );
|
||||
@ -632,7 +632,7 @@ QVariant QskSkinnable::effectiveSkinHint(
|
||||
if ( v.isValid() )
|
||||
return v;
|
||||
|
||||
if ( aspect.state() == QskAspect::NoState )
|
||||
if ( !aspect.hasState() )
|
||||
aspect.setState( skinState() );
|
||||
|
||||
return storedHint( aspect, status );
|
||||
@ -652,7 +652,7 @@ QVariant QskSkinnable::animatedValue(
|
||||
{
|
||||
QVariant v;
|
||||
|
||||
if ( aspect.state() == QskAspect::NoState )
|
||||
if ( !aspect.hasState() )
|
||||
{
|
||||
/*
|
||||
The local animators were invented to be stateless
|
||||
|
Loading…
x
Reference in New Issue
Block a user