Windows QPA: Fix blurry title icons with fractional scale factor

Request the icon pixmaps with DPR=1.

Fixes: QTBUG-90363
Change-Id: I789a72e2ed3379c81c68e1074069823bf633cf2f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Friedemann Kleint 2021-01-18 11:31:27 +01:00
parent e74fd6897b
commit 341b0ef501

View File

@ -2936,7 +2936,8 @@ void QWindowsWindow::setEnabled(bool enabled)
static HICON createHIcon(const QIcon &icon, int xSize, int ySize)
{
if (!icon.isNull()) {
const QPixmap pm = icon.pixmap(icon.actualSize(QSize(xSize, ySize)));
// QTBUG-90363, request DPR=1 for the title bar.
const QPixmap pm = icon.pixmap(icon.actualSize(QSize(xSize, ySize)), 1);
if (!pm.isNull())
return qt_pixmapToWinHICON(pm);
}