mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
LocationCompleterDelegate: Don't make link color lighter
This commit is contained in:
parent
b0c2a09f94
commit
bb76281174
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user