From c56b8a2e55a6c436062eb944685ba130ca7f390e Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 16 Dec 2024 14:49:28 +0800 Subject: [PATCH] fix: icon size not update on dpr changed qApp.devicePixelRatio != window.effectiveDevicePixelRatio in treeland --- src/private/dquickiconimage.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/private/dquickiconimage.cpp b/src/private/dquickiconimage.cpp index a2f19c11..1cc6335d 100644 --- a/src/private/dquickiconimage.cpp +++ b/src/private/dquickiconimage.cpp @@ -22,7 +22,12 @@ bool DQuickIconImagePrivate::updateDevicePixelRatio(qreal targetDevicePixelRatio return true; } #endif + qreal ratio = devicePixelRatio; devicePixelRatio = targetDevicePixelRatio > 1.0 ? targetDevicePixelRatio : calculateDevicePixelRatio(); + + if (ratio != devicePixelRatio) + maybeUpdateUrl(); + return true; }