From 51216956b2b6b29cd77877c473c0d2b5707d3333 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 5 Mar 2013 15:13:12 +0100 Subject: [PATCH] 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 --- src/widgets/styles/qmacstyle_mac.mm | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index a34b08bac4..203cf8c622 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -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(w->parent()) == 0 || - qobject_cast(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) {