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:
parent
6e77f10e1f
commit
7cb2235fd4
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user