diff --git a/src/Gui/EditorView.cpp b/src/Gui/EditorView.cpp index 1ad2f0c972..9f41a88e60 100644 --- a/src/Gui/EditorView.cpp +++ b/src/Gui/EditorView.cpp @@ -820,9 +820,16 @@ void SearchBar::findText(bool skip, bool next, const QString& str) textEditor->setTextCursor(newCursor); - QPalette palette; - palette.setColor(QPalette::Active, QPalette::Base, found ? Qt::white : QColor(255, 80, 80)); - searchText->setPalette(palette); + QString styleSheet; + if (!found) { + styleSheet = QString::fromLatin1( + " QLineEdit {\n" + " background-color: rgb(221,144,161);\n" + " }\n" + ); + } + + searchText->setStyleSheet(styleSheet); } void SearchBar::updateButtons()