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

Sun, 17 Nov 2013 15:06:51 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 17 Nov 2013 15:06:51 +0100
branch
5_3_x
changeset 3093
a0cf4c26566f
parent 3089
2178fb5d197b
child 3094
f453f3040984

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 12:12:43 2013 +0100
+++ b/APIs/Python3/eric5.api	Sun Nov 17 15:06:51 2013 +0100
@@ -6412,6 +6412,7 @@
 eric5.QScintilla.Editor.Editor.clearBreakpoint?4(line)
 eric5.QScintilla.Editor.Editor.clearFlakesWarnings?4()
 eric5.QScintilla.Editor.Editor.clearSearchIndicators?4()
+eric5.QScintilla.Editor.Editor.clearStyles?4()
 eric5.QScintilla.Editor.Editor.clearSyntaxError?4()
 eric5.QScintilla.Editor.Editor.close?4(alsoDelete=False)
 eric5.QScintilla.Editor.Editor.closeIt?4()
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Sun Nov 17 12:12:43 2013 +0100
+++ b/Documentation/Help/source.qhp	Sun Nov 17 15:06:51 2013 +0100
@@ -3988,6 +3988,7 @@
       <keyword name="Editor.clearBreakpoint" id="Editor.clearBreakpoint" ref="eric5.QScintilla.Editor.html#Editor.clearBreakpoint" />
       <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.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.close" id="Editor.close" ref="eric5.QScintilla.Editor.html#Editor.close" />
       <keyword name="Editor.closeIt" id="Editor.closeIt" ref="eric5.QScintilla.Editor.html#Editor.closeIt" />
--- a/Documentation/Source/eric5.QScintilla.Editor.html	Sun Nov 17 12:12:43 2013 +0100
+++ b/Documentation/Source/eric5.QScintilla.Editor.html	Sun Nov 17 15:06:51 2013 +0100
@@ -632,6 +632,9 @@
 <td><a href="#Editor.clearSearchIndicators">clearSearchIndicators</a></td>
 <td>Public method to clear all search indicators.</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>
@@ -2403,6 +2406,12 @@
 <b>clearSearchIndicators</b>(<i></i>)
 <p>
         Public method to clear all search indicators.
+</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 12:12:43 2013 +0100
+++ b/QScintilla/Editor.py	Sun Nov 17 15:06:51 2013 +0100
@@ -5879,6 +5879,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