From a21d96543f613d5fd1178baf875d8bf6cddca9b3 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Thu, 20 Oct 2022 09:23:19 +0200 Subject: [PATCH] using QskRgb::interpolated --- examples/boxes/Box.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/boxes/Box.cpp b/examples/boxes/Box.cpp index dbad97ac..b42028ec 100644 --- a/examples/boxes/Box.cpp +++ b/examples/boxes/Box.cpp @@ -9,6 +9,7 @@ #include #include #include +#include Box::Box( QQuickItem* parentItem ) : QskBox( parentItem ) @@ -34,10 +35,8 @@ void Box::setBackground( FillType type, QGradient::Preset preset, bool inverted if ( type == Solid ) { - const auto& stops = gradient.stops(); - - const auto color = QskGradientStop::interpolated( - stops.first(), stops.last(), 0.5 ); + const auto color = QskRgb::interpolated( + gradient.startColor(), gradient.endColor(), 0.5 ); setGradient( QskGradient( color ) ); }