Correct item indent in checkable menus in stylesheet style
Not only the checkable items need to be indented, but all items in the same menu, so that they line up. Fixes: QTBUG-90242 Change-Id: I559005f753b5cd19eaeeeb6658178d62de93b4ef Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 96e9c8cc8aae718942f79ac98e775f06501b0e25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
22b9e8f889
commit
fa2efb8b35
@ -3794,10 +3794,10 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
|
||||
QRect pmr(0, 0, pixw, pixh);
|
||||
pmr.moveCenter(iconRect.center());
|
||||
p->drawPixmap(pmr.topLeft(), pixmap);
|
||||
} else if (checkable) {
|
||||
} else if (mi.menuHasCheckableItems) {
|
||||
QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark);
|
||||
const QRect cmRect = positionRect(w, subRule, subSubRule, PseudoElement_MenuCheckMark, opt->rect, opt->direction);
|
||||
if (subSubRule.hasDrawable() || checked) {
|
||||
if (checkable && (subSubRule.hasDrawable() || checked)) {
|
||||
QStyleOptionMenuItem newMi = mi;
|
||||
if (!dis)
|
||||
newMi.state |= State_Enabled;
|
||||
|
Loading…
x
Reference in New Issue
Block a user