Macstyle: fix the text color on the disabled button
Forcing it to black make button look enabled, when it's not true. Baseline test already covers this scenario (but probably took wrong snapshot). Pick-to: 6.3 6.2 Fixes: QTBUG-102782 Change-Id: Ifa9041fbf5bf56a7a560e2d1af291c3db2b134f8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
d5113384c9
commit
ecfe8e6e23
@ -3788,7 +3788,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
|||||||
btn.palette.setColor(QPalette::ButtonText, Qt::white);
|
btn.palette.setColor(QPalette::ButtonText, Qt::white);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isDarkMode() && QOperatingSystemVersion::current() > QOperatingSystemVersion::MacOSBigSur) {
|
if (isEnabled && !isDarkMode() && QOperatingSystemVersion::current() > QOperatingSystemVersion::MacOSBigSur) {
|
||||||
if (!isDefault && !(btn.state & State_On)) {
|
if (!isDefault && !(btn.state & State_On)) {
|
||||||
// On macOS 12 it's a gray button, white text color (if set in the
|
// On macOS 12 it's a gray button, white text color (if set in the
|
||||||
// previous statement) would be almost invisible.
|
// previous statement) would be almost invisible.
|
||||||
|
Loading…
Reference in New Issue
Block a user