From cff91429424c0b10c1bd562f2f9699ef2faa30f0 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 2 Apr 2018 13:35:22 -0700 Subject: QMacStyle: Fix "on" toggle button text color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I344c63debdcf012a16305f1b2124e8ad0785d982 Reviewed-by: Morten Johan Sørvig --- src/plugins/styles/mac/qmacstyle_mac.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/styles/mac/qmacstyle_mac.mm') diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 10649e6115..38373087cb 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -3954,7 +3954,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter if (!hasMenu && ct != QMacStylePrivate::Button_SquareButton) { if (isPressed || (isActive && isEnabled - && ((btn.features & QStyleOptionButton::DefaultButton && !d->autoDefaultButton) + && ((btn.state & State_On) + || ((btn.features & QStyleOptionButton::DefaultButton) && !d->autoDefaultButton) || d->autoDefaultButton == btn.styleObject))) btn.palette.setColor(QPalette::ButtonText, Qt::white); } -- cgit v1.2.3