diff options
author | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-02-02 16:46:43 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-02-02 16:47:14 +0100 |
commit | e25b457b5938dea65340583bfdd95fe1430c6c96 (patch) | |
tree | fb2f9d89d3849684933a5ce8ac69b77787ec63a4 | |
parent | 939b4d89c2730289ae051a3e821bf9128d5ed7b4 (diff) |
Avoid drawing a black rectangle due to invalid background for disabled code
Regression in commit ab3d3cf413955afabe845bd80676cd468ebbaa80
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
-rw-r--r-- | src/plugins/texteditor/basetexteditor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index dad53a0c59..589745315d 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -1999,13 +1999,13 @@ void BaseTextEditor::paintEvent(QPaintEvent *e) lineX = fontMetrics().averageCharWidth() * d->m_visibleWrapColumn + offset.x() + 4; if (lineX < viewportRect.width()) { - const QColor backgroundColor = d->m_ifdefedOutFormat.background().color(); + const QBrush background = d->m_ifdefedOutFormat.background(); painter.fillRect(QRectF(lineX, er.top(), viewportRect.width() - lineX, er.height()), - backgroundColor); + background); const QColor col = (palette().base().color().value() > 128) ? Qt::black : Qt::white; const QPen pen = painter.pen(); - painter.setPen(blendColors(backgroundColor, col, 32)); + painter.setPen(blendColors(background.color(), col, 32)); painter.drawLine(QPointF(lineX, er.top()), QPointF(lineX, er.bottom())); painter.setPen(pen); } |