summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMihailNaydenov <garfieldhq@yahoo.com>2014-09-26 19:42:39 +0300
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2014-10-28 14:05:38 +0100
commit6fa2fec1dd3834515b6a898c304ba81b8b91df2f (patch)
tree3b7985999e23cd9825ed40560862c8127f910137
parentb0098056e565d936b0ce1072ea981bc416751701 (diff)
OS X: Fix broken 2x menu icon when style sheet is applied
Task-number: QTBUG-41623 Change-Id: I4e0640a7739d0ce4f8758dd5d8d17882a6947467 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 60bfc8e075..8c52b24869 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -3583,8 +3583,8 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, QIcon::On);
else
pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode);
- int pixw = pixmap.width();
- int pixh = pixmap.height();
+ const int pixw = pixmap.width() / pixmap.devicePixelRatio();
+ const int pixh = pixmap.height() / pixmap.devicePixelRatio();
QRenderRule iconRule = renderRule(w, opt, PseudoElement_MenuIcon);
if (!iconRule.hasGeometry()) {
iconRule.geo = new QStyleSheetGeometryData(pixw, pixh, pixw, pixh, -1, -1);