QMacStyle: Call subElementRect() on proxy style for SE_TabBarTabText

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 <morten.sorvig@theqtcompany.com>
This commit is contained in:
Gabriel de Dietrich 2015-09-04 14:54:07 +02:00 committed by Jake Petroules
parent 4bbdfaa8ff
commit bb1d8c0eda

View File

@ -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,