diff options
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstheme.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowstheme.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index c64955be80..96940f3f4c 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -509,11 +509,8 @@ static QPixmap loadIconFromShell32(int resourceId, QSizeF size) return QPixmap(); } -QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) const +QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &pixmapSize) const { - const QScreen *primaryScreen = QGuiApplication::primaryScreen(); - const int scaleFactor = primaryScreen ? qRound(QHighDpiScaling::factor(primaryScreen)) : 1; - const QSizeF pixmapSize = size * scaleFactor; int resourceId = -1; int stockId = SIID_INVALID; UINT stockFlags = 0; @@ -615,7 +612,6 @@ QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) con stockFlags |= (pixmapSize.width() > 16 ? SHGFI_LARGEICON : SHGFI_SMALLICON); if (QWindowsContext::shell32dll.sHGetStockIconInfo(stockId, SHGFI_ICON | stockFlags, &iconInfo) == S_OK) { pixmap = qt_pixmapFromWinHICON(iconInfo.hIcon); - pixmap.setDevicePixelRatio(scaleFactor); DestroyIcon(iconInfo.hIcon); return pixmap; } @@ -631,7 +627,6 @@ QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) con QPixmap link = loadIconFromShell32(30, pixmapSize); painter.drawPixmap(0, 0, int(pixmapSize.width()), int(pixmapSize.height()), link); } - pixmap.setDevicePixelRatio(scaleFactor); return pixmap; } } @@ -639,13 +634,12 @@ QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) con if (iconName) { HICON iconHandle = LoadIcon(NULL, iconName); QPixmap pixmap = qt_pixmapFromWinHICON(iconHandle); - pixmap.setDevicePixelRatio(scaleFactor); DestroyIcon(iconHandle); if (!pixmap.isNull()) return pixmap; } - return QPlatformTheme::standardPixmap(sp, size); + return QPlatformTheme::standardPixmap(sp, pixmapSize); } enum { // Shell image list ids |