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>
This commit is contained in:
parent
b0098056e5
commit
6fa2fec1dd
@ -3583,8 +3583,8 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
|
|||||||
pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, QIcon::On);
|
pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, QIcon::On);
|
||||||
else
|
else
|
||||||
pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode);
|
pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode);
|
||||||
int pixw = pixmap.width();
|
const int pixw = pixmap.width() / pixmap.devicePixelRatio();
|
||||||
int pixh = pixmap.height();
|
const int pixh = pixmap.height() / pixmap.devicePixelRatio();
|
||||||
QRenderRule iconRule = renderRule(w, opt, PseudoElement_MenuIcon);
|
QRenderRule iconRule = renderRule(w, opt, PseudoElement_MenuIcon);
|
||||||
if (!iconRule.hasGeometry()) {
|
if (!iconRule.hasGeometry()) {
|
||||||
iconRule.geo = new QStyleSheetGeometryData(pixw, pixh, pixw, pixh, -1, -1);
|
iconRule.geo = new QStyleSheetGeometryData(pixw, pixh, pixw, pixh, -1, -1);
|
||||||
|
Loading…
Reference in New Issue
Block a user