QtWidgets: Fix white text color on tabs on macOS for non-macOS styles
Apply white text only for macOS style.
Amends 2c0033983b
Task-number: QTBUG-59784
Change-Id: I9e66e929699efd715ed4565394f1aba763aeb32a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
parent
b387257261
commit
2fbc143202
@ -176,12 +176,11 @@ void QTabBarPrivate::initBasicStyleOption(QStyleOptionTab *option, int tabIndex)
|
||||
|
||||
if (tab.textColor.isValid())
|
||||
option->palette.setColor(q->foregroundRole(), tab.textColor);
|
||||
#ifdef Q_OS_MACOS
|
||||
else if (isCurrent && !documentMode
|
||||
else if (q->style()->inherits("QMacStyle")
|
||||
&& isCurrent && !documentMode
|
||||
&& (QSysInfo::MacintoshVersion < QSysInfo::MV_10_10 || q->isActiveWindow())) {
|
||||
option->palette.setColor(QPalette::WindowText, Qt::white);
|
||||
}
|
||||
#endif
|
||||
option->icon = tab.icon;
|
||||
option->iconSize = q->iconSize(); // Will get the default value then.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user