Welcome: Fix application icon size for > 200% ui scaling

Use the actual image dpr for arithmetics rather than the application
dpr.

Fixes: QTCREATORBUG-30464
Change-Id: I52083bcca067282a677a9d0e1b7c62e9c7270c64
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Alessandro Portale
2024-03-12 22:29:25 +01:00
parent 8713919f31
commit c6ed1d42c3

View File

@@ -139,7 +139,7 @@ public:
const QPixmap croppedLogo = logo.copy(cropR); const QPixmap croppedLogo = logo.copy(cropR);
const int lineHeight = welcomeTF.lineHeight(); const int lineHeight = welcomeTF.lineHeight();
const QPixmap scaledCroppedLogo = const QPixmap scaledCroppedLogo =
croppedLogo.scaledToHeight((lineHeight - 12) * devicePixelRatioF(), croppedLogo.scaledToHeight((lineHeight - 12) * croppedLogo.devicePixelRatioF(),
Qt::SmoothTransformation); Qt::SmoothTransformation);
ideIconLabel->setPixmap(scaledCroppedLogo); ideIconLabel->setPixmap(scaledCroppedLogo);
ideIconLabel->setFixedHeight(lineHeight); ideIconLabel->setFixedHeight(lineHeight);