From 81a7344e1dea562271865ddf94a7d7138e663ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Mon, 16 Aug 2021 08:41:57 +0200 Subject: Port to QImage and QPixmap deviceIndependentSize() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the “size() / devicePixelRatio()” pattern with a call to deviceIndependentSize(). Change-Id: I9d9359e80b9e6643e7395028cd43e3261d449ae7 Reviewed-by: Qt CI Bot Reviewed-by: Tor Arne Vestbø --- src/widgets/widgets/qsplashscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets/qsplashscreen.cpp') diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp index f417a997a7..8adb61c5f2 100644 --- a/src/widgets/widgets/qsplashscreen.cpp +++ b/src/widgets/widgets/qsplashscreen.cpp @@ -284,7 +284,7 @@ void QSplashScreen::setPixmap(const QPixmap &pixmap) d->pixmap = pixmap; setAttribute(Qt::WA_TranslucentBackground, pixmap.hasAlpha()); - const QRect r(QPoint(), pixmap.size() / pixmap.devicePixelRatio()); + const QRect r(QPoint(), pixmap.deviceIndependentSize().toSize()); resize(r.size()); move(screen()->geometry().center() - r.center()); -- cgit v1.2.3