Sun, 17 Nov 2013 15:06:51 +0100
Fixed a bug preventing overriding the editor foreground and background colors, when a lexer was set to None.
--- 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()
--- 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 #################################################################