Skip to content

Commit

Permalink
fix: icon size not update on dpr changed
Browse files Browse the repository at this point in the history
qApp.devicePixelRatio != window.effectiveDevicePixelRatio in treeland
  • Loading branch information
kegechen committed Dec 16, 2024
1 parent d6e0f8e commit c56b8a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/private/dquickiconimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c56b8a2

Please sign in to comment.