section bits added to the resolution matching algo. The switch in the
Header section of the gallery is working again
This commit is contained in:
parent
07cd35ba19
commit
3262673e40
@ -387,7 +387,7 @@ inline constexpr QskAspect QskAspect::stateless() const noexcept
|
|||||||
|
|
||||||
inline constexpr QskAspect QskAspect::trunk() const noexcept
|
inline constexpr QskAspect QskAspect::trunk() const noexcept
|
||||||
{
|
{
|
||||||
return QskAspect( m_bits.subControl, m_bits.section, m_bits.type,
|
return QskAspect( m_bits.subControl, 0, m_bits.type,
|
||||||
m_bits.isAnimator, m_bits.primitive, 0, 0 );
|
m_bits.isAnimator, m_bits.primitive, 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,40 +254,55 @@ bool QskSkinHintTable::isResolutionMatching(
|
|||||||
if ( aspect1.trunk() != aspect2.trunk() )
|
if ( aspect1.trunk() != aspect2.trunk() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const auto a1 = aspect1;
|
auto a1 = aspect1;
|
||||||
const auto a2 = aspect2;
|
auto a2 = aspect2;
|
||||||
|
|
||||||
Q_FOREVER
|
Q_FOREVER
|
||||||
{
|
{
|
||||||
const auto s1 = aspect1.topState();
|
const auto state1 = aspect1.topState();
|
||||||
const auto s2 = aspect2.topState();
|
const auto state2 = aspect2.topState();
|
||||||
|
|
||||||
if ( s1 > s2 )
|
if ( state1 > state2 )
|
||||||
{
|
{
|
||||||
if ( hasHint( aspect1 ) )
|
if ( hasHint( aspect1 ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
aspect1.clearState( s1 );
|
aspect1.clearState( state1 );
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
else if ( s2 > s1 )
|
|
||||||
|
if ( state2 > state1 )
|
||||||
{
|
{
|
||||||
if ( hasHint( aspect2 ) )
|
if ( hasHint( aspect2 ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
aspect2.clearState( s2 );
|
aspect2.clearState( state2 );
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( aspect1 == aspect2 )
|
|
||||||
{
|
|
||||||
if ( hasHint( aspect1 ) )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if ( s1 == 0 )
|
if ( aspect1 == aspect2 )
|
||||||
|
{
|
||||||
|
if ( hasHint( aspect1 ) )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if ( state1 == 0 )
|
||||||
|
{
|
||||||
|
if ( aspect1.variation() == QskAspect::NoVariation )
|
||||||
{
|
{
|
||||||
if ( aspect1.variation() == QskAspect::NoVariation )
|
if ( aspect1.section() == QskAspect::Body )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// clear the section bits and restart with the initial state
|
||||||
|
|
||||||
|
a1.setSection( QskAspect::Body );
|
||||||
|
a2.setSection( QskAspect::Body );
|
||||||
|
|
||||||
|
aspect1 = a1;
|
||||||
|
aspect2 = a2;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// clear the variation bits and restart with the initial state
|
// clear the variation bits and restart with the initial state
|
||||||
aspect1 = a1;
|
aspect1 = a1;
|
||||||
aspect1.setVariation( QskAspect::NoVariation );
|
aspect1.setVariation( QskAspect::NoVariation );
|
||||||
@ -295,15 +310,17 @@ bool QskSkinHintTable::isResolutionMatching(
|
|||||||
aspect2 = a2;
|
aspect2 = a2;
|
||||||
aspect2.setVariation( QskAspect::NoVariation );
|
aspect2.setVariation( QskAspect::NoVariation );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( hasHint( aspect1 ) || hasHint( aspect2 ) )
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
aspect1.clearState( s1 );
|
continue;
|
||||||
aspect2.clearState( s2 );
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( hasHint( aspect1 ) || hasHint( aspect2 ) )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
aspect1.clearState( state1 );
|
||||||
|
aspect2.clearState( state2 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user