diff options
Diffstat (limited to 'src/widgets/widgets/qtabbar.cpp')
-rw-r--r-- | src/widgets/widgets/qtabbar.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index b6a3ef7eb8..6e34198f67 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -63,7 +63,7 @@ #ifndef QT_NO_TABBAR -#ifdef Q_DEAD_CODE_FROM_QT4_MAC +#if 0 // Used to be included in Qt4 for Q_WS_MAC #include <private/qt_mac_p.h> #include <private/qt_cocoa_helpers_mac_p.h> #endif @@ -176,7 +176,12 @@ 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 + && (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. @@ -1922,7 +1927,7 @@ void QTabBar::mousePressEvent(QMouseEvent *event) d->moveTabFinished(d->pressedIndex); d->pressedIndex = d->indexAtPos(event->pos()); -#ifdef Q_DEAD_CODE_FROM_QT4_MAC +#if 0 // Used to be included in Qt4 for Q_WS_MAC d->previousPressedIndex = d->pressedIndex; #endif if (d->validIndex(d->pressedIndex)) { @@ -2004,7 +2009,7 @@ void QTabBar::mouseMoveEvent(QMouseEvent *event) update(); } -#ifdef Q_DEAD_CODE_FROM_QT4_MAC +#if 0 // Used to be included in Qt4 for Q_WS_MAC } else if (!d->documentMode && event->buttons() == Qt::LeftButton && d->previousPressedIndex != -1) { int newPressedIndex = d->indexAtPos(event->pos()); if (d->pressedIndex == -1 && d->previousPressedIndex == newPressedIndex) { @@ -2102,7 +2107,7 @@ void QTabBar::mouseReleaseEvent(QMouseEvent *event) event->ignore(); return; } -#ifdef Q_DEAD_CODE_FROM_QT4_MAC +#if 0 // Used to be included in Qt4 for Q_WS_MAC d->previousPressedIndex = -1; #endif if (d->movable && d->dragInProgress && d->validIndex(d->pressedIndex)) { |