Change fixed selection colors to style based palette. Issue #16454

This commit is contained in:
Frank Martinez
2024-09-18 19:58:35 +00:00
committed by Chris Hennes
parent 075d30c12c
commit 6afc6c7757

View File

@@ -1356,10 +1356,9 @@ void PropertyListEditor::highlightCurrentLine()
if (!isReadOnly()) {
QTextEdit::ExtraSelection selection;
QColor lineColor = QColor(Qt::yellow).lighter(160);
selection.format.setBackground(lineColor);
QColor textColor = QColor(Qt::black);
selection.format.setForeground(textColor);
QPalette palette = style()->standardPalette();
selection.format.setBackground(palette.highlight().color());
selection.format.setForeground(palette.highlightedText().color());
selection.format.setProperty(QTextFormat::FullWidthSelection, true);
selection.cursor = textCursor();