Mismatched parens background color now dark on dark backgrounds.

The color is not configurable, but on dark backgrounds, the color is now
dark magenta, rather than magenta.

Task-number: QTCREATORBUG-9025

Change-Id: I9925e598b30a13c8b9691d6e0e576c0087df38da
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Frank Secilia
2013-05-20 19:02:42 -06:00
committed by Orgad Shaneh
parent 53e3157641
commit 84e6ab02ed

View File

@@ -239,7 +239,8 @@ BaseTextEditorWidget::BaseTextEditorWidget(QWidget *parent)
d->m_formatRange = true;
d->m_matchFormat.setForeground(Qt::red);
d->m_matchFormat.setBackground(QColor(0xb4, 0xee, 0xb4));
d->m_mismatchFormat.setBackground(Qt::magenta);
d->m_mismatchFormat.setBackground(palette().color(QPalette::Base).value() < 128
? Qt::darkMagenta : Qt::magenta);
d->m_parenthesesMatchingTimer.setSingleShot(true);
connect(&d->m_parenthesesMatchingTimer, SIGNAL(timeout()), this, SLOT(_q_matchParentheses()));