Corrected some code style issues. eric7

Wed, 29 Dec 2021 17:54:06 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 29 Dec 2021 17:54:06 +0100
branch
eric7
changeset 8879
159a4d6bab47
parent 8878
3dcbc240a940
child 8880
4b631598f752

Corrected some code style issues.

eric7/Preferences/ConfigurationPages/IconsPreviewDialog.py file | annotate | diff | comparison | revisions
eric7/Preferences/ConfigurationPages/LogViewerPage.py file | annotate | diff | comparison | revisions
--- 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()
--- a/eric7/Preferences/ConfigurationPages/LogViewerPage.py	Wed Dec 29 17:43:59 2021 +0100
+++ b/eric7/Preferences/ConfigurationPages/LogViewerPage.py	Wed Dec 29 17:54:06 2021 +0100
@@ -96,6 +96,7 @@
         if colorKey == "LogStdErrColour":
             self.errorTextExample.setStyleSheet(f"color: {color.name()}")
 
+
 def create(dlg):
     """
     Module function to create the configuration page.

eric ide

mercurial