Widgets/fusion style: remove check for _q_isComboBoxPopupItem property
The fusion style was the only style which checked for an undocumented property '_q_isComboBoxPopupItem' to determine if a CE_MenuItem should ignore the drawing of a checkmark. Remove it to be in sync with all other styles. Task-number: QTBUG-127536 Change-Id: I6f0af2219a2da1d8d1920cb95c233fb3e32a21ab Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit a3568a19eaba98697854db50af5546c09464ca73) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
cd34e5c7ba
commit
7fb7972021
@ -1453,13 +1453,10 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
|
||||
int checkcol = qMax<int>(menuItem->rect.height() * 0.79,
|
||||
qMax<int>(menuItem->maxIconWidth, dpiScaled(21, option)));
|
||||
bool ignoreCheckMark = false;
|
||||
if (
|
||||
#if QT_CONFIG(combobox)
|
||||
qobject_cast<const QComboBox*>(widget) ||
|
||||
#endif
|
||||
(option->styleObject && option->styleObject->property("_q_isComboBoxPopupItem").toBool()))
|
||||
if (qobject_cast<const QComboBox*>(widget))
|
||||
ignoreCheckMark = true; //ignore the checkmarks provided by the QComboMenuDelegate
|
||||
|
||||
#endif
|
||||
if (!ignoreCheckMark || menuItem->state & (State_On | State_Off)) {
|
||||
// Check, using qreal and QRectF to avoid error accumulation
|
||||
const qreal boxMargin = dpiScaled(3.5, option);
|
||||
|
Loading…
x
Reference in New Issue
Block a user