17 QApplication, QMenu, QPalette, QMainWindow, QFont, QVBoxLayout, QLabel |
17 QApplication, QMenu, QPalette, QMainWindow, QFont, QVBoxLayout, QLabel |
18 from PyQt4.Qsci import QsciScintilla |
18 from PyQt4.Qsci import QsciScintilla |
19 |
19 |
20 from E5Gui.E5Action import E5Action, createActionGroup |
20 from E5Gui.E5Action import E5Action, createActionGroup |
21 from E5Gui import E5MessageBox, E5FileDialog |
21 from E5Gui import E5MessageBox, E5FileDialog |
|
22 from E5Gui.E5Application import E5Application |
22 |
23 |
23 from . import Lexers |
24 from . import Lexers |
24 from .QsciScintillaCompat import QsciScintillaCompat |
25 from .QsciScintillaCompat import QsciScintillaCompat |
25 from .SearchReplaceWidget import SearchReplaceWidget |
26 from .SearchReplaceWidget import SearchReplaceWidget |
26 |
27 |
2163 if Preferences.getEditor("CustomSelectionColours"): |
2164 if Preferences.getEditor("CustomSelectionColours"): |
2164 self.__textEdit.setSelectionBackgroundColor( |
2165 self.__textEdit.setSelectionBackgroundColor( |
2165 Preferences.getEditorColour("SelectionBackground")) |
2166 Preferences.getEditorColour("SelectionBackground")) |
2166 else: |
2167 else: |
2167 self.__textEdit.setSelectionBackgroundColor( |
2168 self.__textEdit.setSelectionBackgroundColor( |
2168 QApplication.palette().color(QPalette.Highlight)) |
2169 E5Application.palette().color(QPalette.Highlight)) |
2169 if Preferences.getEditor("ColourizeSelText"): |
2170 if Preferences.getEditor("ColourizeSelText"): |
2170 self.__textEdit.resetSelectionForegroundColor() |
2171 self.__textEdit.resetSelectionForegroundColor() |
2171 elif Preferences.getEditor("CustomSelectionColours"): |
2172 elif Preferences.getEditor("CustomSelectionColours"): |
2172 self.__textEdit.setSelectionForegroundColor( |
2173 self.__textEdit.setSelectionForegroundColor( |
2173 Preferences.getEditorColour("SelectionForeground")) |
2174 Preferences.getEditorColour("SelectionForeground")) |
2174 else: |
2175 else: |
2175 self.__textEdit.setSelectionForegroundColor( |
2176 self.__textEdit.setSelectionForegroundColor( |
2176 QApplication.palette().color(QPalette.HighlightedText)) |
2177 E5Application.palette().color(QPalette.HighlightedText)) |
2177 self.__textEdit.setSelectionToEol(Preferences.getEditor("ExtendSelectionToEol")) |
2178 self.__textEdit.setSelectionToEol(Preferences.getEditor("ExtendSelectionToEol")) |
2178 self.__textEdit.setCaretForegroundColor( |
2179 self.__textEdit.setCaretForegroundColor( |
2179 Preferences.getEditorColour("CaretForeground")) |
2180 Preferences.getEditorColour("CaretForeground")) |
2180 self.__textEdit.setCaretLineBackgroundColor( |
2181 self.__textEdit.setCaretLineBackgroundColor( |
2181 Preferences.getEditorColour("CaretLineBackground")) |
2182 Preferences.getEditorColour("CaretLineBackground")) |