From 7cb2235fd44fa247cc19f3826def23e93b653e89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig@digia.com>
Date: Wed, 18 Mar 2015 11:20:26 +0100
Subject: [PATCH] QSplashScreen: Center also on high-dpi screens

Correctly compute QSplashScreen geometry based on
pixmap geometry.

Change-Id: Ibd7af54f0732c99116e1ec82a1aa4f8c4d7d390e
Task-number: QTBUG-34334
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
---
 src/widgets/widgets/qsplashscreen.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp
index 1ee69c7635..b8c70f2f0f 100644
--- a/src/widgets/widgets/qsplashscreen.cpp
+++ b/src/widgets/widgets/qsplashscreen.cpp
@@ -281,7 +281,7 @@ void QSplashScreen::setPixmap(const QPixmap &pixmap)
     d->pixmap = pixmap;
     setAttribute(Qt::WA_TranslucentBackground, pixmap.hasAlpha());
 
-    QRect r(QPoint(), d->pixmap.size());
+    QRect r(QPoint(), d->pixmap.size()  / d->pixmap.devicePixelRatio());
     resize(r.size());
     move(QApplication::desktop()->screenGeometry().center() - r.center());
     if (isVisible())