From 6afc6c77576bd2ce88d9928f346e645bd8a2dbd2 Mon Sep 17 00:00:00 2001 From: Frank Martinez Date: Wed, 18 Sep 2024 19:58:35 +0000 Subject: [PATCH] Change fixed selection colors to style based palette. Issue #16454 --- src/Gui/Widgets.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 97d80e89bb..e3b618a0c6 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -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();