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-05 09:38:49 +0200 |
commit | 768ee4e499c281b480cc30ca5acd64f4d30e1260 (patch) | |
tree | fc8767119d3f2d42977c379e70d1ab4ad2c71111 /src/plugins/styles | |
parent | 865d61c0daf0f9662afd217c3118cc1349e4f18d (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).
Fixes: QTBUG-102782
Change-Id: Ifa9041fbf5bf56a7a560e2d1af291c3db2b134f8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit ecfe8e6e23a8136301036ed75116a4ce2dd4cab0)
Diffstat (limited to 'src/plugins/styles')
-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 52382140a4..c0c8788efb 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -3790,7 +3790,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. |