QScintilla/Editor.py

changeset 1566
0cb791cc631a
parent 1518
e6e21910210d
child 1588
dccffd13be8d
diff -r 9d2cccd2074e -r 0cb791cc631a QScintilla/Editor.py
--- a/QScintilla/Editor.py	Fri Jan 20 18:54:06 2012 +0100
+++ b/QScintilla/Editor.py	Sat Jan 21 15:01:53 2012 +0100
@@ -1428,6 +1428,9 @@
         
         self.__setAnnotationStyles()
         
+        self.lexer_.setDefaultColor(self.lexer_.color(0))
+        self.lexer_.setDefaultPaper(self.lexer_.paper(0))
+        
     def __styleNeeded(self, position):
         """
         Private slot to handle the need for more styling.
@@ -3412,6 +3415,9 @@
         if self.lexer_ is not None:
             self.lexer_.readSettings(Preferences.Prefs.settings, "Scintilla")
             self.lexer_.initProperties()
+            
+            self.lexer_.setDefaultColor(self.lexer_.color(0))
+            self.lexer_.setDefaultPaper(self.lexer_.paper(0))
         
         # read the typing completer settings
         if self.completer is not None:
@@ -3683,6 +3689,10 @@
         except AttributeError:
             pass
         self.__setAnnotationStyles()
+        
+        if Preferences.getEditor("OverrideEditAreaColours"):
+            self.setColor(Preferences.getEditorColour("EditAreaForeground"))
+            self.setPaper(Preferences.getEditorColour("EditAreaBackground"))
     
     def __setEolMode(self):
         """

eric ide

mercurial