Mac style: Fix selected tab text color on 10.6
This is a regression introduced by 65b39b3cdcdfe175d80ccf9428168ed51be77fd8. Task-number: QTBUG-34540 Change-Id: I1f78337b13c806f6b6794b769cfe99206445ce7a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
parent
ab76593f18
commit
f6cd378e24
@ -3865,8 +3865,9 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
ThemeTabDirection ttd = getTabDirection(myTab.shape);
|
||||
bool verticalTabs = ttd == kThemeTabWest || ttd == kThemeTabEast;
|
||||
bool selected = (myTab.state & QStyle::State_Selected);
|
||||
bool usingModernOSX = QSysInfo::MacintoshVersion > QSysInfo::MV_10_6;
|
||||
|
||||
if (selected && !myTab.documentMode)
|
||||
if (usingModernOSX && selected && !myTab.documentMode)
|
||||
myTab.palette.setColor(QPalette::WindowText, QColor(Qt::white));
|
||||
|
||||
// Check to see if we use have the same as the system font
|
||||
@ -3874,7 +3875,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
// outside world, unless they read the source, in which case, it's
|
||||
// their own fault).
|
||||
bool nonDefaultFont = p->font() != qt_app_fonts_hash()->value("QComboMenuItem");
|
||||
if (selected || verticalTabs || nonDefaultFont || !tab->icon.isNull()
|
||||
if ((usingModernOSX && selected) || verticalTabs || nonDefaultFont || !tab->icon.isNull()
|
||||
|| !myTab.leftButtonSize.isNull() || !myTab.rightButtonSize.isNull()) {
|
||||
int heightOffset = 0;
|
||||
if (verticalTabs) {
|
||||
@ -3885,7 +3886,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
}
|
||||
myTab.rect.setHeight(myTab.rect.height() + heightOffset);
|
||||
|
||||
if (myTab.documentMode || selected) {
|
||||
if (myTab.documentMode || (usingModernOSX && selected)) {
|
||||
p->save();
|
||||
rotateTabPainter(p, myTab.shape, myTab.rect);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user