eric7/Preferences/ConfigurationPages/IconsPreviewDialog.py

branch
eric7
changeset 8879
159a4d6bab47
parent 8871
772712033639
child 8881
54e42bc2437a
--- 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()

eric ide

mercurial