From 0f0cda626c697fe5244853dbdd14feb0cf81055e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 17 Sep 2009 12:58:59 +0200 Subject: Use the proxy in QStyle Reviewed-by: trustme --- src/gui/styles/qstyle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp index 2614bfb..eef1573 100644 --- a/src/gui/styles/qstyle.cpp +++ b/src/gui/styles/qstyle.cpp @@ -463,7 +463,7 @@ QRect QStyle::itemTextRect(const QFontMetrics &metrics, const QRect &rect, int a rect.getRect(&x, &y, &w, &h); if (!text.isEmpty()) { result = metrics.boundingRect(x, y, w, h, alignment, text); - if (!enabled && styleHint(SH_EtchDisabledText)) { + if (!enabled && proxy()->styleHint(SH_EtchDisabledText)) { result.setWidth(result.width()+1); result.setHeight(result.height()+1); } @@ -525,12 +525,12 @@ void QStyle::drawItemText(QPainter *painter, const QRect &rect, int alignment, c painter->setPen(QPen(pal.brush(textRole), savedPen.widthF())); } if (!enabled) { - if (styleHint(SH_DitherDisabledText)) { + if (proxy()->styleHint(SH_DitherDisabledText)) { QRect br; painter->drawText(rect, alignment, text, &br); painter->fillRect(br, QBrush(painter->background().color(), Qt::Dense5Pattern)); return; - } else if (styleHint(SH_EtchDisabledText)) { + } else if (proxy()->styleHint(SH_EtchDisabledText)) { QPen pen = painter->pen(); painter->setPen(pal.light().color()); painter->drawText(rect.adjusted(1, 1, 1, 1), alignment, text); -- cgit v0.12