diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2022-05-02 08:12:13 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2022-05-02 09:44:43 +0200 |
commit | ecfe8e6e23a8136301036ed75116a4ce2dd4cab0 (patch) | |
tree | a1fd817f4caefba9c66e586b584cdb7974aafbe1 /src/plugins/styles/mac/qmacstyle_mac.mm | |
parent | d5113384c9ef9a3b01a856b7317d7d756023af91 (diff) |
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>
Diffstat (limited to 'src/plugins/styles/mac/qmacstyle_mac.mm')
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 3676a6ffb6..5e281b4e1d 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -3788,7 +3788,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter 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)) { // On macOS 12 it's a gray button, white text color (if set in the // previous statement) would be almost invisible. |