summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qwindowsstyle.cpp
diff options
context:
space:
mode:
authorMihailNaydenov <garfieldhq@yahoo.com>2014-09-24 14:01:31 +0300
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2014-09-30 10:32:34 +0200
commitc55324aee0e8ba2ef7dd53294cb60e914cb40500 (patch)
treeffcdce3dfce35869449336d997f7678db8e70dd6 /src/widgets/styles/qwindowsstyle.cpp
parentee911e5616ac0b2a334f3121ad7c5ea5040fb089 (diff)
Additional support for devicePixelRatio in CE_MenuItem’s icon painting
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 <Friedemann.Kleint@digia.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Diffstat (limited to 'src/widgets/styles/qwindowsstyle.cpp')
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp4
1 files changed, 2 insertions, 2 deletions
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));