1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

LocationCompleterDelegate: Don't make link color lighter

This commit is contained in:
David Rosca 2018-01-25 09:32:12 +01:00
parent b0c2a09f94
commit bb76281174
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -319,16 +319,6 @@ int LocationCompleterDelegate::viewItemDrawText(QPainter *p, const QStyleOptionV
if (!delimiters.isEmpty() && !(delimiters.count() % 2)) {
QList<QTextLayout::FormatRange> highlightParts;
QTextLayout::FormatRange lighterWholeLine;
lighterWholeLine.start = 0;
lighterWholeLine.length = elidedText.size();
QColor lighterColor = color.lighter(130);
if (lighterColor == color) {
lighterColor = QColor(Qt::gray).darker(180);
}
lighterWholeLine.format.setForeground(lighterColor);
highlightParts << lighterWholeLine;
while (!delimiters.isEmpty()) {
QTextLayout::FormatRange highlightedPart;
int start = delimiters.takeFirst();
@ -337,7 +327,6 @@ int LocationCompleterDelegate::viewItemDrawText(QPainter *p, const QStyleOptionV
highlightedPart.length = end - start;
highlightedPart.format.setFontWeight(QFont::Bold);
highlightedPart.format.setUnderlineStyle(QTextCharFormat::SingleUnderline);
highlightedPart.format.setForeground(color);
highlightParts << highlightedPart;
}