diff options
author | Robert Griebl <rgriebl@trolltech.com> | 2010-03-19 15:18:32 (GMT) |
---|---|---|
committer | Robert Griebl <rgriebl@trolltech.com> | 2010-03-19 15:20:57 (GMT) |
commit | 8c56170a03bb7ce21d875a1f12561ead799ff209 (patch) | |
tree | 1f7d8110aaf0543345312cbed560b151cebd5f95 /src/gui | |
parent | b1c9df1e46f38e9bedef95647721c77a2bb69386 (diff) | |
download | Qt-8c56170a03bb7ce21d875a1f12561ead799ff209.zip Qt-8c56170a03bb7ce21d875a1f12561ead799ff209.tar.gz Qt-8c56170a03bb7ce21d875a1f12561ead799ff209.tar.bz2 |
Tab color fix for document mode on Snow Leopard.
The window frame/toolbar color is different (a bit lighter) for snow leopard,
so we need to adjust the tab color in document mode .
Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/styles/qmacstyle_mac.mm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 116b03e..7097291 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -237,12 +237,14 @@ void drawTabShape(QPainter *p, const QStyleOptionTabV3 *tabOpt) // fill body if (active) { - p->fillRect(rect, QColor(151, 151, 151)); + int d = (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) ? 16 : 0; + p->fillRect(rect, QColor(151 + d, 151 + d, 151 + d)); } else { + int d = (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) ? 9 : 0; QLinearGradient gradient(rect.topLeft(), rect.bottomLeft()); - gradient.setColorAt(0, QColor(207, 207, 207)); - gradient.setColorAt(0.5, QColor(206, 206, 206)); - gradient.setColorAt(1, QColor(201, 201, 201)); + gradient.setColorAt(0, QColor(207 + d, 207 + d, 207 + d)); + gradient.setColorAt(0.5, QColor(206 + d, 206 + d, 206 + d)); + gradient.setColorAt(1, QColor(201 + d, 201 + d, 201 + d)); p->fillRect(rect, gradient); } |