diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp index 969e53b8e1..d14f021c0e 100644 --- a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp @@ -2949,11 +2949,10 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption QIcon::Mode mode = dis ? QIcon::Disabled : QIcon::Normal; if (act && !dis) mode = QIcon::Active; - QPixmap pixmap; - if (checked) - pixmap = menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, option, widget), mode, QIcon::On); - else - pixmap = menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, option, widget), mode); + const auto size = proxy()->pixelMetric(PM_SmallIconSize, option, widget); + const auto dpr = painter->device()->devicePixelRatio(); + const auto pixmap = menuitem->icon.pixmap({size, size}, dpr, mode, + checked ? QIcon::On : QIcon::Off); QRect pmr(QPoint(0, 0), pixmap.deviceIndependentSize().toSize()); pmr.moveCenter(vCheckRect.center()); painter->setPen(menuitem->palette.text().color());