From c93958a24da7a704ed8fe6ec782f1bfb00b7dff2 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Thu, 2 Dec 2021 17:33:53 +0100 Subject: [PATCH] respect the device pixel ratio --- src/controls/QskSkinlet.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/controls/QskSkinlet.cpp b/src/controls/QskSkinlet.cpp index 4caea2fa..041c4b0c 100644 --- a/src/controls/QskSkinlet.cpp +++ b/src/controls/QskSkinlet.cpp @@ -368,8 +368,21 @@ QSGNode* QskSkinlet::updateArcNode( const QskSkinnable* skinnable, if ( arcNode == nullptr ) arcNode = new QskArcNode(); - arcNode->setArcData( rect, absoluteArcMetrics, fillGradient, - control->window() ); + auto r = rect; +#if 1 + { + /* + Fiddling around with the pixel ratio should be hidden below QskArcNode. + Code will break once QskArcNode is not texture based anymore. TODO ... + */ + + const auto ratio = control->window()->effectiveDevicePixelRatio(); + absoluteArcMetrics.setWidth( absoluteArcMetrics.width() * ratio ); + r.setSize( r.size() * ratio ); + } +#endif + + arcNode->setArcData( r, absoluteArcMetrics, fillGradient, control->window() ); return arcNode; }