diff --git a/designsystems/material3/QskMaterial3ProgressBarSkinlet.cpp b/designsystems/material3/QskMaterial3ProgressBarSkinlet.cpp index 81622505..dfd6ce24 100644 --- a/designsystems/material3/QskMaterial3ProgressBarSkinlet.cpp +++ b/designsystems/material3/QskMaterial3ProgressBarSkinlet.cpp @@ -5,9 +5,7 @@ #include "QskMaterial3ProgressBarSkinlet.h" #include -#include -#include -#include +#include #include #include #include @@ -65,11 +63,11 @@ QSGNode* QskMaterial3ProgressBarSkinlet::updateStopIndicatorNode( else rect.setBottom( rect.top() + rect.width() ); - const auto color = progressBar->gradientHint( Q::Fill ).endColor(); - const auto shape = progressBar->boxShapeHint( Q::Fill ); + QskBoxHints hints; + hints.shape = progressBar->boxShapeHint( Q::Fill ); + hints.gradient = progressBar->gradientHint( Q::Fill ).endColor(); - return updateBoxNode( progressBar, node, rect, shape, - QskBoxBorderMetrics(), QskBoxBorderColors(), color ); + return updateBoxNode( progressBar, node, rect, hints ); } QSGNode* QskMaterial3ProgressBarSkinlet::updateGrooveClipNode( diff --git a/src/controls/QskMenuSkinlet.cpp b/src/controls/QskMenuSkinlet.cpp index 7ee5bf81..d8a5fd2e 100644 --- a/src/controls/QskMenuSkinlet.cpp +++ b/src/controls/QskMenuSkinlet.cpp @@ -9,6 +9,7 @@ #include "QskGraphic.h" #include "QskColorFilter.h" #include "QskTextOptions.h" +#include "QskBoxHints.h" #include "QskFunctions.h" #include "QskMargins.h" #include "QskFunctions.h" @@ -572,11 +573,13 @@ QSGNode* QskMenuSkinlet::updateSampleNode( const QskSkinnable* skinnable, if ( subControl == Q::Separator ) { - auto gradient = menu->gradientHint( subControl ); + auto hints = skinnable->boxHints( subControl ); + + auto& gradient = hints.gradient; if ( ( gradient.type() == QskGradient::Stops ) && !gradient.isMonochrome() ) gradient.setLinearDirection( Qt::Vertical ); - return updateBoxNode( menu, node, rect, gradient, subControl ); + return updateBoxNode( menu, node, rect, hints ); } return nullptr; diff --git a/src/controls/QskPopupSkinlet.cpp b/src/controls/QskPopupSkinlet.cpp index 47f2fbef..eeca9992 100644 --- a/src/controls/QskPopupSkinlet.cpp +++ b/src/controls/QskPopupSkinlet.cpp @@ -6,6 +6,7 @@ #include "QskPopupSkinlet.h" #include "QskPopup.h" #include "QskRgbValue.h" +#include "QskBoxHints.h" static inline QRgb qskInterpolatedRgb( QRgb rgb, qreal factor ) { @@ -58,7 +59,9 @@ QSGNode* QskPopupSkinlet::updateOverlayNode( if ( rect.isEmpty() ) return nullptr; - auto gradient = popup->gradientHint( Q::Overlay ); + auto hints = popup->boxHints( Q::Overlay ); + + auto& gradient = hints.gradient; if ( gradient.isVisible() && factor != 1.0 ) { @@ -70,7 +73,7 @@ QSGNode* QskPopupSkinlet::updateOverlayNode( gradient.setStops( stops ); } - return updateBoxNode( popup, node, rect, gradient, QskPopup::Overlay ); + return updateBoxNode( popup, node, rect, hints ); } #include "moc_QskPopupSkinlet.cpp" diff --git a/src/controls/QskSeparatorSkinlet.cpp b/src/controls/QskSeparatorSkinlet.cpp index a117f328..fcf12a34 100644 --- a/src/controls/QskSeparatorSkinlet.cpp +++ b/src/controls/QskSeparatorSkinlet.cpp @@ -6,6 +6,7 @@ #include "QskSeparatorSkinlet.h" #include "QskSeparator.h" +#include "QskBoxHints.h" #include "QskGradientDirection.h" #include "QskAspect.h" @@ -42,8 +43,12 @@ QSGNode* QskSeparatorSkinlet::updateSubNode( using Q = QskSeparator; const auto rect = separator->subControlRect( Q::Panel ); + if ( rect.isEmpty() ) + return nullptr; - auto gradient = separator->gradientHint( Q::Panel ); + auto hints = separator->boxHints( Q::Panel ); + + auto& gradient = hints.gradient; if ( ( gradient.type() == QskGradient::Stops ) && !gradient.isMonochrome() ) { // gradient in opposite orientation @@ -53,7 +58,7 @@ QSGNode* QskSeparatorSkinlet::updateSubNode( gradient.setLinearDirection( orientation ); } - return updateBoxNode( separator, node, rect, gradient, Q::Panel ); + return updateBoxNode( separator, node, rect, hints ); } }