--- qstylesheetstyle.cpp-backup	2020-05-11 10:15:08.000000000 +0200
+++ qstylesheetstyle.cpp	2020-07-15 20:36:06.933311900 +0200
@@ -3737,7 +3737,12 @@
                     QIcon::Mode mode = dis ? QIcon::Disabled : QIcon::Normal;
                     if (act && !dis)
                         mode = QIcon::Active;
-                    const QPixmap pixmap(mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, checked ? QIcon::On : QIcon::Off));
+                    QPixmap pixmap;
+                    if (checked)
+                        pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, QIcon::On);
+                    else
+                        pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode);
+
                     const int pixw = pixmap.width() / pixmap.devicePixelRatio();
                     const int pixh = pixmap.height() / pixmap.devicePixelRatio();
                     QRenderRule iconRule = renderRule(w, opt, PseudoElement_MenuIcon);
@@ -3748,10 +3753,6 @@
                         iconRule.geo->height = pixh;
                     }
                     QRect iconRect = positionRect(w, subRule, iconRule, PseudoElement_MenuIcon, opt->rect, opt->direction);
-                    if (opt->direction == Qt::LeftToRight)
-                        iconRect.moveLeft(iconRect.left());
-                    else
-                        iconRect.moveRight(iconRect.right());
                     iconRule.drawRule(p, iconRect);
                     QRect pmr(0, 0, pixw, pixh);
                     pmr.moveCenter(iconRect.center());
@@ -3761,10 +3762,6 @@
                     const QRect cmRect = positionRect(w, subRule, subSubRule, PseudoElement_MenuCheckMark, opt->rect, opt->direction);
                     if (subSubRule.hasDrawable() || checked) {
                         QStyleOptionMenuItem newMi = mi;
-                        if (!dis)
-                            newMi.state |= State_Enabled;
-                        if (mi.checked)
-                            newMi.state |= State_On;
                         newMi.rect = cmRect;
                         drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, w);
                     }
@@ -3772,9 +3769,7 @@
                 }
 
                 QRect textRect = subRule.contentsRect(opt->rect);
-                textRect.setLeft(textRect.left() + textRectOffset);
                 textRect.setWidth(textRect.width() - mi.tabWidth);
-                const QRect vTextRect = visualRect(opt->direction, m->rect, textRect);
 
                 QStringRef s(&mi.text);
                 p->setPen(mi.palette.buttonText().color());
@@ -3789,7 +3784,7 @@
                         p->drawText(vShortcutRect, text_flags, s.mid(t + 1).toString());
                         s = s.left(t);
                     }
-                    p->drawText(vTextRect, text_flags, s.left(t).toString());
+                    p->drawText(textRect, text_flags, s.left(t).toString());
                 }
 
                 if (mi.menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow
@@ -5136,25 +5131,11 @@
                 return QSize(sz.width(), subRule.size().height());
             }
             if ((pe == PseudoElement_Item) && (subRule.hasBox() || subRule.hasBorder() || subRule.hasFont)) {
-                QSize sz(csz);
+
+                int width = csz.width();
                 if (mi->text.contains(QLatin1Char('\t')))
-                    sz.rwidth() += 12; //as in QCommonStyle
-                bool checkable = mi->checkType != QStyleOptionMenuItem::NotCheckable;
-                if (!mi->icon.isNull()) {
-                    const int pmSmall = pixelMetric(PM_SmallIconSize);
-                    const QSize pmSize = mi->icon.actualSize(QSize(pmSmall, pmSmall));
-                    sz.rwidth() += pmSize.width() + 4;
-                } else if (checkable) {
-                    QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark);
-                    QRect checkmarkRect = positionRect(w, subRule, subSubRule, PseudoElement_MenuCheckMark, opt->rect, opt->direction);
-                    sz.rwidth() += std::max(mi->maxIconWidth, checkmarkRect.width()) + 4;
-                }
-                if (subRule.hasFont) {
-                    QFontMetrics fm(subRule.font);
-                    const QRect r = fm.boundingRect(QRect(), Qt::TextSingleLine | Qt::TextShowMnemonic, mi->text);
-                    sz = sz.expandedTo(r.size());
-                }
-                return subRule.boxSize(subRule.adjustSize(sz));
+                    width += 12; //as in QCommonStyle
+                return subRule.boxSize(subRule.adjustSize(QSize(width, csz.height())));
             }
         }
         break;
