QScintilla/MiniEditor.py

changeset 2084
d3f083dd0222
parent 2077
68a34718a0ce
child 2101
5bac7dee9e1a
equal deleted inserted replaced
2083:3005ae4463aa 2084:d3f083dd0222
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
23 22
24 from . import Lexers 23 from . import Lexers
25 from .QsciScintillaCompat import QsciScintillaCompat 24 from .QsciScintillaCompat import QsciScintillaCompat
26 from .SearchReplaceWidget import SearchReplaceWidget 25 from .SearchReplaceWidget import SearchReplaceWidget
27 26
2164 if Preferences.getEditor("CustomSelectionColours"): 2163 if Preferences.getEditor("CustomSelectionColours"):
2165 self.__textEdit.setSelectionBackgroundColor( 2164 self.__textEdit.setSelectionBackgroundColor(
2166 Preferences.getEditorColour("SelectionBackground")) 2165 Preferences.getEditorColour("SelectionBackground"))
2167 else: 2166 else:
2168 self.__textEdit.setSelectionBackgroundColor( 2167 self.__textEdit.setSelectionBackgroundColor(
2169 E5Application.palette().color(QPalette.Highlight)) 2168 QApplication.palette().color(QPalette.Highlight))
2170 if Preferences.getEditor("ColourizeSelText"): 2169 if Preferences.getEditor("ColourizeSelText"):
2171 self.__textEdit.resetSelectionForegroundColor() 2170 self.__textEdit.resetSelectionForegroundColor()
2172 elif Preferences.getEditor("CustomSelectionColours"): 2171 elif Preferences.getEditor("CustomSelectionColours"):
2173 self.__textEdit.setSelectionForegroundColor( 2172 self.__textEdit.setSelectionForegroundColor(
2174 Preferences.getEditorColour("SelectionForeground")) 2173 Preferences.getEditorColour("SelectionForeground"))
2175 else: 2174 else:
2176 self.__textEdit.setSelectionForegroundColor( 2175 self.__textEdit.setSelectionForegroundColor(
2177 E5Application.palette().color(QPalette.HighlightedText)) 2176 QApplication.palette().color(QPalette.HighlightedText))
2178 self.__textEdit.setSelectionToEol(Preferences.getEditor("ExtendSelectionToEol")) 2177 self.__textEdit.setSelectionToEol(Preferences.getEditor("ExtendSelectionToEol"))
2179 self.__textEdit.setCaretForegroundColor( 2178 self.__textEdit.setCaretForegroundColor(
2180 Preferences.getEditorColour("CaretForeground")) 2179 Preferences.getEditorColour("CaretForeground"))
2181 self.__textEdit.setCaretLineBackgroundColor( 2180 self.__textEdit.setCaretLineBackgroundColor(
2182 Preferences.getEditorColour("CaretLineBackground")) 2181 Preferences.getEditorColour("CaretLineBackground"))

eric ide

mercurial