This commit is contained in:
2024-01-18 17:39:42 +03:00
parent e0134b3b5e
commit ccf17510d8

View File

@@ -878,9 +878,9 @@ void QCodeEdit::highlightBrackets() {
void QCodeEdit::applyExtraSelection() { void QCodeEdit::applyExtraSelection() {
auto inverseColorValue = [](const QColor & c) { auto inverseColorValue = [](const QColor & c) {
qreal hsv[4]; int hsv[4];
c.getHsvF(&hsv[0], &hsv[1], &hsv[2], &hsv[3]); c.getHsv(&hsv[0], &hsv[1], &hsv[2], &hsv[3]);
return QColor::fromHsvF(hsv[0], hsv[1], 1. - hsv[2], hsv[3]); return QColor::fromHsv(hsv[0], hsv[1], 255 - hsv[2], hsv[3]);
}; };
QList<QTextEdit::ExtraSelection> esl; QList<QTextEdit::ExtraSelection> esl;
esl << es_line << es_selected << es_custom << es_brackets << es_search_list << es_cursor << es_link; esl << es_line << es_selected << es_custom << es_brackets << es_search_list << es_cursor << es_link;