--- a/eric7/Preferences/ConfigurationPages/IconsPreviewDialog.py Wed Dec 29 17:43:59 2021 +0100 +++ b/eric7/Preferences/ConfigurationPages/IconsPreviewDialog.py Wed Dec 29 17:54:06 2021 +0100 @@ -68,16 +68,13 @@ """ self.__inverted = checked - if self.__inverted: - styleSheet = ( - f"color: {self.__backgroundColor.name()};" - f"background-color: {self.__foregroundColor.name()}" - ) - else: - styleSheet = ( - f"color: {self.__foregroundColor.name()};" - f"background-color: {self.__backgroundColor.name()}" - ) + styleSheet = ( + f"color: {self.__backgroundColor.name()};" + f"background-color: {self.__foregroundColor.name()}" + if self.__inverted else + f"color: {self.__foregroundColor.name()};" + f"background-color: {self.__backgroundColor.name()}" + ) self.iconView.viewport().setStyleSheet(styleSheet) self.on_refreshButton_clicked()