--- a/eric7/EricWidgets/EricTextEditSearchWidget.py Sun Dec 26 18:43:48 2021 +0100 +++ b/eric7/EricWidgets/EricTextEditSearchWidget.py Sun Dec 26 18:49:26 2021 +0100 @@ -458,13 +458,12 @@ @param error flag indicating an error condition @type bool """ - if error: - styleSheet = "color: #000000; background-color: #ff6666" - else: - styleSheet = ( - f"color: {self.__defaultTextColor};" - f" background-color: {self.__defaultBaseColor}" - ) + styleSheet = ( + "color: #000000; background-color: #ff6666" + if error else + f"color: {self.__defaultTextColor};" + f" background-color: {self.__defaultBaseColor}" + ) self.findtextCombo.setStyleSheet(styleSheet) def __findTextFinished(self, result):