Gui: in search bar set red background color as style sheet because a palette won't work if an application wide style sheet is set

This commit is contained in:
wmayer
2021-11-25 15:11:46 +01:00
parent 9283aa0f72
commit 3648948711

View File

@@ -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()