diff options
-rw-r--r-- | src/gui/styles/qstyle.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp index d47c610..a5ab80e 100644 --- a/src/gui/styles/qstyle.cpp +++ b/src/gui/styles/qstyle.cpp @@ -526,8 +526,9 @@ void QStyle::drawItemText(QPainter *painter, const QRect &rect, int alignment, c } if (!enabled) { if (styleHint(SH_DitherDisabledText)) { - painter->drawText(rect, alignment, text); - painter->fillRect(painter->boundingRect(rect, alignment, text), QBrush(painter->background().color(), Qt::Dense5Pattern)); + QRect br; + painter->drawText(rect, alignment, text, &br); + painter->fillRect(br, QBrush(painter->background().color(), Qt::Dense5Pattern)); return; } else if (styleHint(SH_EtchDisabledText)) { QPen pen = painter->pen(); |