Preferences/ConfigurationPages/EditorStylesPage.py

changeset 1566
0cb791cc631a
parent 1509
c0b5e693b0eb
child 2162
4627e6ea7b6b
--- a/Preferences/ConfigurationPages/EditorStylesPage.py	Fri Jan 20 18:54:06 2012 +0100
+++ b/Preferences/ConfigurationPages/EditorStylesPage.py	Sat Jan 21 15:01:53 2012 +0100
@@ -177,6 +177,15 @@
         self.enableAnnotationsCheckBox.setChecked(
             Preferences.getEditor("AnnotationsEnabled"))
         
+        self.editAreaOverrideCheckBox.setChecked(
+            Preferences.getEditor("OverrideEditAreaColours"))
+        self.editorColours["EditAreaForeground"] = \
+            self.initColour("EditAreaForeground", self.editAreaForegroundButton,
+                Preferences.getEditorColour)
+        self.editorColours["EditAreaBackground"] = \
+            self.initColour("EditAreaBackground", self.editAreaBackgroundButton,
+                Preferences.getEditorColour)
+    
     def save(self):
         """
         Public slot to save the Editor Styles configuration.
@@ -236,6 +245,9 @@
         Preferences.setEditor("AnnotationsEnabled",
             self.enableAnnotationsCheckBox.isChecked())
         
+        Preferences.setEditor("OverrideEditAreaColours",
+            self.editAreaOverrideCheckBox.isChecked())
+        
         for key in list(self.editorColours.keys()):
             Preferences.setEditorColour(key, self.editorColours[key])
         
@@ -493,6 +505,24 @@
         self.editorColours["WhitespaceBackground"] = \
             self.selectColour(self.whitespaceBackgroundButton,
                 self.editorColours["WhitespaceBackground"])
+    
+    @pyqtSlot()
+    def on_editAreaForegroundButton_clicked(self):
+        """
+        Private slot to set the foreground colour of the edit area.
+        """
+        self.editorColours["EditAreaForeground"] = \
+            self.selectColour(self.editAreaForegroundButton,
+                self.editorColours["EditAreaForeground"])
+        
+    @pyqtSlot()
+    def on_editAreaBackgroundButton_clicked(self):
+        """
+        Private slot to set the background colour of the edit area.
+        """
+        self.editorColours["EditAreaBackground"] = \
+            self.selectColour(self.editAreaBackgroundButton,
+                self.editorColours["EditAreaBackground"])
 
 
 def create(dlg):

eric ide

mercurial