From d42c07546d7742f22afaa41e1e35e05ded9a25ad Mon Sep 17 00:00:00 2001 From: kleuter Date: Wed, 24 Nov 2021 21:07:03 +0100 Subject: [PATCH] Revert "5.15.7 - fixed QTBUG-98483" This reverts commit d28c1a721631e456863a24a797b6e06f0ccc7b8e. --- .../qtbase/src/plugins/styles/mac/qmacstyle_mac.mm | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/5.15.7/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm b/5.15.7/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm index b3130b7..4ee1289 100644 --- a/5.15.7/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/5.15.7/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm @@ -3742,18 +3742,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter pb.enabled = isEnabled; [pb highlight:isPressed]; - - // In the past 'highlight' was doing its job nicely, giving an image of recessed - // (e.g.) blue button which looks differently from un-pressed 'default' button. - // Starting from Monterey this is not enough - with simple highlight and the state - // 'off' we get a button that looks like have it suddenly lost its theme embellishment - // and depending on the app's appearance, we may also erroneously draw a text with - // (e.g.) white on light grey. - if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMonterey) - pb.state = isHighlighted || isPressed ? NSControlStateValueOn : NSControlStateValueOff; - else - pb.state = isHighlighted && !isPressed ? NSControlStateValueOn : NSControlStateValueOff; - + pb.state = isHighlighted && !isPressed ? NSOnState : NSOffState; d->drawNSViewInRect(pb, frameRect, p, ^(CGContextRef, const CGRect &r) { [pb.cell drawBezelWithFrame:r inView:pb.superview]; });