Fixed a bug preventing overriding the editor foreground and background colors, when a lexer was set to None.

Sun, 17 Nov 2013 15:07:56 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 17 Nov 2013 15:07:56 +0100
changeset 3095
72938a6d5047
parent 3092
f7ec7a3e7270
child 3096
23856c207f81

Fixed a bug preventing overriding the editor foreground and background colors, when a lexer was set to None.

APIs/Python3/eric5.api file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
Documentation/Source/eric5.QScintilla.Editor.html file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/APIs/Python3/eric5.api	Sun Nov 17 13:28:39 2013 +0100
+++ b/APIs/Python3/eric5.api	Sun Nov 17 15:07:56 2013 +0100
@@ -6688,6 +6688,7 @@
 eric5.QScintilla.Editor.Editor.clearFlakesWarnings?4()
 eric5.QScintilla.Editor.Editor.clearSearchIndicators?4()
 eric5.QScintilla.Editor.Editor.clearStyleWarnings?4()
+eric5.QScintilla.Editor.Editor.clearStyles?4()
 eric5.QScintilla.Editor.Editor.clearSyntaxError?4()
 eric5.QScintilla.Editor.Editor.clearWarnings?4()
 eric5.QScintilla.Editor.Editor.close?4(alsoDelete=False)
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Sun Nov 17 13:28:39 2013 +0100
+++ b/Documentation/Help/source.qhp	Sun Nov 17 15:07:56 2013 +0100
@@ -4393,6 +4393,7 @@
       <keyword name="Editor.clearFlakesWarnings" id="Editor.clearFlakesWarnings" ref="eric5.QScintilla.Editor.html#Editor.clearFlakesWarnings" />
       <keyword name="Editor.clearSearchIndicators" id="Editor.clearSearchIndicators" ref="eric5.QScintilla.Editor.html#Editor.clearSearchIndicators" />
       <keyword name="Editor.clearStyleWarnings" id="Editor.clearStyleWarnings" ref="eric5.QScintilla.Editor.html#Editor.clearStyleWarnings" />
+      <keyword name="Editor.clearStyles" id="Editor.clearStyles" ref="eric5.QScintilla.Editor.html#Editor.clearStyles" />
       <keyword name="Editor.clearSyntaxError" id="Editor.clearSyntaxError" ref="eric5.QScintilla.Editor.html#Editor.clearSyntaxError" />
       <keyword name="Editor.clearWarnings" id="Editor.clearWarnings" ref="eric5.QScintilla.Editor.html#Editor.clearWarnings" />
       <keyword name="Editor.close" id="Editor.close" ref="eric5.QScintilla.Editor.html#Editor.close" />
--- a/Documentation/Source/eric5.QScintilla.Editor.html	Sun Nov 17 13:28:39 2013 +0100
+++ b/Documentation/Source/eric5.QScintilla.Editor.html	Sun Nov 17 15:07:56 2013 +0100
@@ -647,6 +647,9 @@
 <td><a href="#Editor.clearStyleWarnings">clearStyleWarnings</a></td>
 <td>Public slot to clear all style warnings.</td>
 </tr><tr>
+<td><a href="#Editor.clearStyles">clearStyles</a></td>
+<td>Public method to set the styles according the selected Qt style or the selected editor colours.</td>
+</tr><tr>
 <td><a href="#Editor.clearSyntaxError">clearSyntaxError</a></td>
 <td>Public slot to handle the 'Clear all syntax error' context menu action.</td>
 </tr><tr>
@@ -2530,6 +2533,12 @@
 <b>clearStyleWarnings</b>(<i></i>)
 <p>
         Public slot to clear all style warnings.
+</p><a NAME="Editor.clearStyles" ID="Editor.clearStyles"></a>
+<h4>Editor.clearStyles</h4>
+<b>clearStyles</b>(<i></i>)
+<p>
+        Public method to set the styles according the selected Qt style
+        or the selected editor colours.
 </p><a NAME="Editor.clearSyntaxError" ID="Editor.clearSyntaxError"></a>
 <h4>Editor.clearSyntaxError</h4>
 <b>clearSyntaxError</b>(<i></i>)
--- a/QScintilla/Editor.py	Sun Nov 17 13:28:39 2013 +0100
+++ b/QScintilla/Editor.py	Sun Nov 17 15:07:56 2013 +0100
@@ -6152,6 +6152,16 @@
         
         self.useMonospaced = on
     
+    def clearStyles(self):
+        """
+        Public method to set the styles according the selected Qt style
+        or the selected editor colours.
+        """
+        super().clearStyles()
+        if Preferences.getEditor("OverrideEditAreaColours"):
+            self.setColor(Preferences.getEditorColour("EditAreaForeground"))
+            self.setPaper(Preferences.getEditorColour("EditAreaBackground"))
+    
     #################################################################
     ## Drag and Drop Support
     #################################################################

eric ide

mercurial