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>
This commit is contained in:
Morten Johan Sørvig 2015-03-18 11:20:26 +01:00 committed by Morten Johan Sørvig
parent 6e77f10e1f
commit 7cb2235fd4

View File

@ -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())