Draw StatusBar with gradient on mac

We can safely remove code applying to 10.3 on mac.
We also should draw the gradient even on non unified toolbars.

Change-Id: Ia97c3c93daf7a711c3ce4b61b74a5eb1d914519b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Jens Bache-Wiig 2013-03-05 15:13:12 +01:00 committed by The Qt Project
parent 03e2ea2ac0
commit 51216956b2

View File

@ -3201,18 +3201,6 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
drawTabCloseButton(p, hover, active, selected);
} break;
case PE_PanelStatusBar: {
if (QSysInfo::MacintoshVersion <= QSysInfo::MV_10_4) {
QCommonStyle::drawPrimitive(pe, opt, p, w);
break;
}
// Use the Leopard style only if the status bar is the status bar for a
// QMainWindow with a unifed toolbar.
if (w == 0 || w->parent() == 0 || qobject_cast<QMainWindow *>(w->parent()) == 0 ||
qobject_cast<QMainWindow *>(w->parent())->unifiedTitleAndToolBarOnMac() == false ) {
QCommonStyle::drawPrimitive(pe, opt, p, w);
break;
}
// Fill the status bar with the titlebar gradient.
QLinearGradient linearGrad(0, opt->rect.top(), 0, opt->rect.bottom());
if (opt->state & QStyle::State_Active) {