From abf9b1763e3c1996f71e962fcc5105142e42307f Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Tue, 5 Sep 2017 12:48:58 +0200 Subject: [PATCH] typos fixed --- src/common/QskBorderMetrics.h | 2 +- src/controls/QskSkinnable.cpp | 40 +++++++++++++++++------------------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/common/QskBorderMetrics.h b/src/common/QskBorderMetrics.h index 75152d35..bce7f3aa 100644 --- a/src/common/QskBorderMetrics.h +++ b/src/common/QskBorderMetrics.h @@ -4,7 +4,7 @@ *****************************************************************************/ #ifndef QSK_BORDER_METRICS_H -#define QSK_BORDER_HINTS_H +#define QSK_BORDER_METRICS_H #include "QskGlobal.h" #include "QskMargins.h" diff --git a/src/controls/QskSkinnable.cpp b/src/controls/QskSkinnable.cpp index e329df2f..d037808f 100644 --- a/src/controls/QskSkinnable.cpp +++ b/src/controls/QskSkinnable.cpp @@ -643,29 +643,22 @@ void QskSkinnable::startTransition( QskAspect::Aspect aspect, if ( control->window() == nullptr || !control->isInitiallyPainted() ) return; - if ( from == to ) + // We might be invalid for one of the values, when an aspect + // has not been defined for all states ( f.e. metrics are expected + // to fallback to 0.0 ). In this case we create a default one. + + if ( !from.isValid() ) + { + from = QVariant( to.type() ); + } + else if ( !to.isValid() ) + { + to = QVariant( from.type() ); + } + else if ( from.type() != to.type() ) { return; } - else - { - // We might be invalid for one of the values, when an aspect - // has not been defined for all states ( f.e. metrics are expected - // to fallback to 0.0 ). In this case we create a default one. - - if ( !from.isValid() ) - { - from = QVariant( to.type() ); - } - else if ( !to.isValid() ) - { - to = QVariant( from.type() ); - } - else if ( from.type() != to.type() ) - { - return; - } - } if( aspect.flagPrimitive() == QskAspect::GraphicRole ) { @@ -706,6 +699,13 @@ void QskSkinnable::setSkinStateFlag( QskAspect::State state, bool on ) return; QskControl* control = owningControl(); + +#if 0 + qDebug() << control->className() << ":" + << skinStateAsPrintable( m_data->skinState ) << "->" + << skinStateAsPrintable( newState ); +#endif + if ( control->window() && control->isInitiallyPainted() ) { for ( const auto entry : m_data->hintTable.hints() )