src/eric7/Preferences/ConfigurationPages/EditorCalltipsPage.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
--- a/src/eric7/Preferences/ConfigurationPages/EditorCalltipsPage.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Preferences/ConfigurationPages/EditorCalltipsPage.py	Wed Jul 13 14:55:47 2022 +0200
@@ -19,6 +19,7 @@
     """
     Class implementing the Editor Calltips configuration page.
     """
+
     def __init__(self):
         """
         Constructor
@@ -26,63 +27,67 @@
         super().__init__()
         self.setupUi(self)
         self.setObjectName("EditorCalltipsPage")
-        
+
         self.positionComboBox.addItem(
-            self.tr("Below Text"),
-            QsciScintilla.CallTipsPosition.CallTipsBelowText)
+            self.tr("Below Text"), QsciScintilla.CallTipsPosition.CallTipsBelowText
+        )
         self.positionComboBox.addItem(
-            self.tr("Above Text"),
-            QsciScintilla.CallTipsPosition.CallTipsAboveText)
-        
+            self.tr("Above Text"), QsciScintilla.CallTipsPosition.CallTipsAboveText
+        )
+
         # set initial values
-        self.ctEnabledCheckBox.setChecked(
-            Preferences.getEditor("CallTipsEnabled"))
-        
-        self.ctVisibleSlider.setValue(
-            Preferences.getEditor("CallTipsVisible"))
-        
-        self.initColour("CallTipsBackground", self.calltipsBackgroundButton,
-                        Preferences.getEditorColour)
-        self.initColour("CallTipsForeground", self.calltipsForegroundButton,
-                        Preferences.getEditorColour)
-        self.initColour("CallTipsHighlight", self.calltipsHighlightButton,
-                        Preferences.getEditorColour)
-        
+        self.ctEnabledCheckBox.setChecked(Preferences.getEditor("CallTipsEnabled"))
+
+        self.ctVisibleSlider.setValue(Preferences.getEditor("CallTipsVisible"))
+
+        self.initColour(
+            "CallTipsBackground",
+            self.calltipsBackgroundButton,
+            Preferences.getEditorColour,
+        )
+        self.initColour(
+            "CallTipsForeground",
+            self.calltipsForegroundButton,
+            Preferences.getEditorColour,
+        )
+        self.initColour(
+            "CallTipsHighlight",
+            self.calltipsHighlightButton,
+            Preferences.getEditorColour,
+        )
+
         self.ctScintillaCheckBox.setChecked(
-            Preferences.getEditor("CallTipsScintillaOnFail"))
-        
+            Preferences.getEditor("CallTipsScintillaOnFail")
+        )
+
         self.positionComboBox.setCurrentIndex(
-            self.positionComboBox.findData(
-                Preferences.getEditor("CallTipsPosition")))
-        
+            self.positionComboBox.findData(Preferences.getEditor("CallTipsPosition"))
+        )
+
     def save(self):
         """
         Public slot to save the EditorCalltips configuration.
         """
-        Preferences.setEditor(
-            "CallTipsEnabled",
-            self.ctEnabledCheckBox.isChecked())
-        
+        Preferences.setEditor("CallTipsEnabled", self.ctEnabledCheckBox.isChecked())
+
+        Preferences.setEditor("CallTipsVisible", self.ctVisibleSlider.value())
+
+        self.saveColours(Preferences.setEditorColour)
+
         Preferences.setEditor(
-            "CallTipsVisible",
-            self.ctVisibleSlider.value())
-        
-        self.saveColours(Preferences.setEditorColour)
-        
-        Preferences.setEditor(
-            "CallTipsScintillaOnFail",
-            self.ctScintillaCheckBox.isChecked())
-        
+            "CallTipsScintillaOnFail", self.ctScintillaCheckBox.isChecked()
+        )
+
         Preferences.setEditor(
             "CallTipsPosition",
-            self.positionComboBox.itemData(
-                self.positionComboBox.currentIndex()))
+            self.positionComboBox.itemData(self.positionComboBox.currentIndex()),
+        )
 
 
 def create(dlg):
     """
     Module function to create the configuration page.
-    
+
     @param dlg reference to the configuration dialog
     @return reference to the instantiated page (ConfigurationPageBase)
     """

eric ide

mercurial