From bb1d8c0edaf463ceaec931c03ec829eaff733d69 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 4 Sep 2015 14:54:07 +0200 Subject: [PATCH] QMacStyle: Call subElementRect() on proxy style for SE_TabBarTabText MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When drawing the tab bar text shadow, we call drawControl() on the proxy style, so we should do the same for subElementRect(). Change-Id: Ic3477d4c053d9cce42abd3f93a4e1bf265f025ce Task-number: QTBUG-41600 Reviewed-by: Morten Johan Sørvig --- src/widgets/styles/qmacstyle_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 3219952f7f..f828583d8c 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -4266,7 +4266,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter QPalette np = tab->palette; np.setColor(QPalette::WindowText, shadowColor); - QRect nr = subElementRect(SE_TabBarTabText, opt, w); + QRect nr = proxy()->subElementRect(SE_TabBarTabText, opt, w); nr.moveTop(-1); int alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextHideMnemonic; proxy()->drawItemText(p, nr, alignment, np, tab->state & State_Enabled,