diff -r 9d2cccd2074e -r 0cb791cc631a Preferences/ConfigurationPages/EditorStylesPage.py --- 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):