From c55324aee0e8ba2ef7dd53294cb60e914cb40500 Mon Sep 17 00:00:00 2001 From: MihailNaydenov Date: Wed, 24 Sep 2014 14:01:31 +0300 Subject: =?UTF-8?q?Additional=20support=20for=20devicePixelRatio=20in=20CE?= =?UTF-8?q?=5FMenuItem=E2=80=99s=20icon=20painting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FusionStyle and MacStyle have this already, the change just brings it to the others. Task-number: QTBUG-40277 Change-Id: I08dc80771b9cd0ab47179e1994ab6510b022eade Reviewed-by: Friedemann Kleint Reviewed-by: Alessandro Portale --- src/widgets/styles/qwindowsstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets/styles/qwindowsstyle.cpp') diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 9b20ec3dbd..708014a6df 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -1145,8 +1145,8 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai pixmap = menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, opt, widget), mode, QIcon::On); else pixmap = menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, opt, widget), mode); - int pixw = pixmap.width(); - int pixh = pixmap.height(); + const int pixw = pixmap.width() / pixmap.devicePixelRatio(); + const int pixh = pixmap.height() / pixmap.devicePixelRatio(); if (act && !dis && !checked) qDrawShadePanel(p, vCheckRect, menuitem->palette, false, 1, &menuitem->palette.brush(QPalette::Button)); -- cgit v1.2.3