QtWidgets: Fix white text color on tabs on macOS for non-macOS styles
Apply white text only for macOS style. Amends 2c0033983bc53e906eab3f4b2fae836ff8472713 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())
|
if (tab.textColor.isValid())
|
||||||
option->palette.setColor(q->foregroundRole(), tab.textColor);
|
option->palette.setColor(q->foregroundRole(), tab.textColor);
|
||||||
#ifdef Q_OS_MACOS
|
else if (q->style()->inherits("QMacStyle")
|
||||||
else if (isCurrent && !documentMode
|
&& isCurrent && !documentMode
|
||||||
&& (QSysInfo::MacintoshVersion < QSysInfo::MV_10_10 || q->isActiveWindow())) {
|
&& (QSysInfo::MacintoshVersion < QSysInfo::MV_10_10 || q->isActiveWindow())) {
|
||||||
option->palette.setColor(QPalette::WindowText, Qt::white);
|
option->palette.setColor(QPalette::WindowText, Qt::white);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
option->icon = tab.icon;
|
option->icon = tab.icon;
|
||||||
option->iconSize = q->iconSize(); // Will get the default value then.
|
option->iconSize = q->iconSize(); // Will get the default value then.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user