284 Private method to configure the text display. |
284 Private method to configure the text display. |
285 """ |
285 """ |
286 self.setTabWidth(Preferences.getEditor("TabWidth")) |
286 self.setTabWidth(Preferences.getEditor("TabWidth")) |
287 if Preferences.getEditor("ShowWhitespace"): |
287 if Preferences.getEditor("ShowWhitespace"): |
288 self.setWhitespaceVisibility(QsciScintilla.WsVisible) |
288 self.setWhitespaceVisibility(QsciScintilla.WsVisible) |
|
289 try: |
|
290 self.setWhitespaceForegroundColor( |
|
291 Preferences.getEditorColour("WhitespaceForeground")) |
|
292 self.setWhitespaceBackgroundColor( |
|
293 Preferences.getEditorColour("WhitespaceBackground")) |
|
294 self.setWhitespaceSize( |
|
295 Preferences.getEditor("WhitespaceSize")) |
|
296 except AttributeError: |
|
297 # QScintilla before 2.5 doesn't support this |
|
298 pass |
289 else: |
299 else: |
290 self.setWhitespaceVisibility(QsciScintilla.WsInvisible) |
300 self.setWhitespaceVisibility(QsciScintilla.WsInvisible) |
291 self.setEolVisibility(Preferences.getEditor("ShowEOL")) |
301 self.setEolVisibility(Preferences.getEditor("ShowEOL")) |
292 if Preferences.getEditor("BraceHighlighting"): |
302 if Preferences.getEditor("BraceHighlighting"): |
293 self.setBraceMatching(QsciScintilla.SloppyBraceMatch) |
303 self.setBraceMatching(QsciScintilla.SloppyBraceMatch) |