Reapply 0d9208cecb on 5.11
This change amendsbb10305dd1b61f, which lost0d9208ceand brought src/plugins/styles/mac/qmacstyle_mac.mm back. In4f3249f32d, it was moved to src/plugins/styles/mac in 5.10. Task-number: QTBUG-65773 Change-Id: I721268caf12067ed798f5846234cd2fdf3e493dc Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
parent
c4e41fa534
commit
8920bf32ee
|
|
@ -3348,13 +3348,12 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
|
|||
}
|
||||
break;
|
||||
case PE_IndicatorMenuCheckMark: {
|
||||
if (!(opt->state & State_On))
|
||||
break;
|
||||
QColor pc;
|
||||
if (opt->state & State_Selected)
|
||||
if (opt->state & State_On)
|
||||
pc = opt->palette.highlightedText().color();
|
||||
else
|
||||
pc = opt->palette.text().color();
|
||||
|
||||
QCFType<CGColorRef> checkmarkColor = CGColorCreateGenericRGB(static_cast<CGFloat>(pc.redF()),
|
||||
static_cast<CGFloat>(pc.greenF()),
|
||||
static_cast<CGFloat>(pc.blueF()),
|
||||
|
|
@ -4273,8 +4272,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
|||
const int xp = mi->rect.x() + macItemFrame;
|
||||
checkmarkOpt.rect = QRect(xp, mi->rect.y() - checkmarkOpt.fontMetrics.descent(), mw, mh);
|
||||
|
||||
checkmarkOpt.state |= State_On; // Always on. Never rendered when off.
|
||||
checkmarkOpt.state.setFlag(State_Selected, active);
|
||||
checkmarkOpt.state.setFlag(State_On, active);
|
||||
checkmarkOpt.state.setFlag(State_Enabled, enabled);
|
||||
if (widgetSize == QStyleHelper::SizeMini)
|
||||
checkmarkOpt.state |= State_Mini;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue