QMessageBox: Try to pass window handle to QIcon::pixmap().
Try to find a window handle so that the pixmap matching the device pixel ratio of the screen can be found. Task-number: QTBUG-52622 Change-Id: Iccf3cea82065af5e055d3cd932cd0808b29b15dc Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>bb10
parent
5386a35d35
commit
ff49c56450
|
|
@ -2677,8 +2677,17 @@ QPixmap QMessageBoxPrivate::standardIcon(QMessageBox::Icon icon, QMessageBox *mb
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (!tmpIcon.isNull())
|
||||
return tmpIcon.pixmap(iconSize, iconSize);
|
||||
if (!tmpIcon.isNull()) {
|
||||
QWindow *window = Q_NULLPTR;
|
||||
if (mb) {
|
||||
window = mb->windowHandle();
|
||||
if (!window) {
|
||||
if (const QWidget *nativeParent = mb->nativeParentWidget())
|
||||
window = nativeParent->windowHandle();
|
||||
}
|
||||
}
|
||||
return tmpIcon.pixmap(window, QSize(iconSize, iconSize));
|
||||
}
|
||||
return QPixmap();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue