diff options
author | Błażej Szczygieł <spaz16@wp.pl> | 2017-03-28 21:31:37 +0200 |
---|---|---|
committer | Błażej Szczygieł <spaz16@wp.pl> | 2017-04-11 05:56:17 +0000 |
commit | f3938b87972dd1ede65ca2a41af0e5c38a418c2f (patch) | |
tree | 0cdb582d862bef549f5b10c97bab65b153bf2922 | |
parent | 7e751898a3cc35c664bcb4299e1b334058c340e0 (diff) |
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>
(cherry picked from commit 2fbc1432025dd478cf9e940e3c2a1952b218c6dc)
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
-rw-r--r-- | src/widgets/widgets/qtabbar.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index b5ec91f59c..077ed02dc4 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -170,12 +170,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. |