Sun, 17 Nov 2013 15:07:56 +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 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)
--- 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 #################################################################