forked from qt-creator/qt-creator
Fix margin drawing when disabled code has a 'transparent' background
(default). Merge-request: 201 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
893f5bfd23
commit
c0b02c61d2
@@ -2364,7 +2364,8 @@ void BaseTextEditor::paintEvent(QPaintEvent *e)
|
||||
|
||||
const QColor col = (palette().base().color().value() > 128) ? Qt::black : Qt::white;
|
||||
const QPen pen = painter.pen();
|
||||
painter.setPen(blendColors(background.color(), col, 32));
|
||||
painter.setPen(blendColors(background.isOpaque() ? background.color() : palette().base().color(),
|
||||
col, 32));
|
||||
painter.drawLine(QPointF(lineX, er.top()), QPointF(lineX, er.bottom()));
|
||||
painter.setPen(pen);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user