macOS: Fix use of deprecated NSOffState

Pick-to: 5.15
Change-Id: Ic799c52350f99a14f57efa9907db772d19264ca2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-05-26 19:44:03 +02:00
parent e7d12b876a
commit 6a0995525d

View File

@ -3969,7 +3969,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
pbCell = static_cast<NSPopUpButtonCell *>(pb.cell);
oldPosition = pbCell.arrowPosition;
pbCell.arrowPosition = NSPopUpNoArrow;
if (pb.state == NSOffState) {
if (pb.state == NSControlStateValueOff) {
// NSPopUpButton in this state is smaller.
rAdjusted.origin.x -= 3;
rAdjusted.size.width += 6;