QStyleSheetStyle: do not bypass the base class' overrides

Change-Id: Iae8e24dd6c511071724fde62277ea5054b9c5253
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Giuseppe D'Angelo 2019-05-13 23:47:56 +02:00
parent 8ab4d2028f
commit 0290525ffb

View File

@ -3446,7 +3446,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
case CE_ToolButtonLabel:
if (const QStyleOptionToolButton *btn = qstyleoption_cast<const QStyleOptionToolButton *>(opt)) {
if (rule.hasBox() || btn->features & QStyleOptionToolButton::Arrow) {
QCommonStyle::drawControl(ce, opt, p, w);
QWindowsStyle::drawControl(ce, opt, p, w);
} else {
QStyleOptionToolButton butOpt(*btn);
rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button);
@ -3827,7 +3827,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
if (subRule.hasDrawable()) {
subRule.drawRule(p, opt->rect);
QCommonStyle::drawControl(ce, &mi, p, w);
QCommonStyle::drawControl(ce, &mi, p, w); // deliberate bypass of the base
} else {
if (rule.hasDrawable() && !(opt->state & QStyle::State_Selected)) {
// So that the menu bar background is not hidden by the items