DiffEditor: Use settings' foreground color for highlights

Simplify drawing highlights by passing selections
into a drawing function.
Reduce selections which are covered completely by
other selections.

Task-number: QTCREATORBUG-12844
Change-Id: If282d5c881d25cac1b8db4ac8dfc45d47b0b8580
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
jkobus
2014-09-25 15:48:21 +02:00
committed by Orgad Shaneh
parent cb4f04f416
commit 5c6b1373c4
4 changed files with 116 additions and 66 deletions

View File

@@ -495,7 +495,11 @@ protected:
bool viewportEvent(QEvent *event);
void resizeEvent(QResizeEvent *);
void paintEvent(QPaintEvent *);
virtual void innerPaintEvent(QPaintEvent *) {}
virtual void paintBlock(QPainter *painter,
const QTextBlock &block,
const QPointF &offset,
const QVector<QTextLayout::FormatRange> &selections,
const QRect &clipRect) const;
void timerEvent(QTimerEvent *);
void mouseMoveEvent(QMouseEvent *);
void mousePressEvent(QMouseEvent *);