QScintilla/Editor.py

changeset 2084
d3f083dd0222
parent 2077
68a34718a0ce
child 2162
4627e6ea7b6b
equal deleted inserted replaced
2083:3005ae4463aa 2084:d3f083dd0222
14 pyqtSlot, QCryptographicHash, QEvent, QDateTime, QRegExp, Qt 14 pyqtSlot, QCryptographicHash, QEvent, QDateTime, QRegExp, Qt
15 from PyQt4.QtGui import QCursor, QPrinter, QPrintDialog, QLineEdit, QActionGroup, \ 15 from PyQt4.QtGui import QCursor, QPrinter, QPrintDialog, QLineEdit, QActionGroup, \
16 QDialog, QAbstractPrintDialog, QInputDialog, QApplication, QMenu, QPalette, QFont 16 QDialog, QAbstractPrintDialog, QInputDialog, QApplication, QMenu, QPalette, QFont
17 from PyQt4.Qsci import QsciScintilla, QsciMacro, QsciStyledText 17 from PyQt4.Qsci import QsciScintilla, QsciMacro, QsciStyledText
18 18
19 from E5Gui.E5Application import e5App, E5Application 19 from E5Gui.E5Application import e5App
20 from E5Gui import E5FileDialog, E5MessageBox 20 from E5Gui import E5FileDialog, E5MessageBox
21 21
22 from . import Exporters 22 from . import Exporters
23 from . import Lexers 23 from . import Lexers
24 from . import TypingCompleters 24 from . import TypingCompleters
3679 if Preferences.getEditor("CustomSelectionColours"): 3679 if Preferences.getEditor("CustomSelectionColours"):
3680 self.setSelectionBackgroundColor( 3680 self.setSelectionBackgroundColor(
3681 Preferences.getEditorColour("SelectionBackground")) 3681 Preferences.getEditorColour("SelectionBackground"))
3682 else: 3682 else:
3683 self.setSelectionBackgroundColor( 3683 self.setSelectionBackgroundColor(
3684 E5Application.palette().color(QPalette.Highlight)) 3684 QApplication.palette().color(QPalette.Highlight))
3685 if Preferences.getEditor("ColourizeSelText"): 3685 if Preferences.getEditor("ColourizeSelText"):
3686 self.resetSelectionForegroundColor() 3686 self.resetSelectionForegroundColor()
3687 elif Preferences.getEditor("CustomSelectionColours"): 3687 elif Preferences.getEditor("CustomSelectionColours"):
3688 self.setSelectionForegroundColor( 3688 self.setSelectionForegroundColor(
3689 Preferences.getEditorColour("SelectionForeground")) 3689 Preferences.getEditorColour("SelectionForeground"))
3690 else: 3690 else:
3691 self.setSelectionForegroundColor( 3691 self.setSelectionForegroundColor(
3692 E5Application.palette().color(QPalette.HighlightedText)) 3692 QApplication.palette().color(QPalette.HighlightedText))
3693 self.setSelectionToEol(Preferences.getEditor("ExtendSelectionToEol")) 3693 self.setSelectionToEol(Preferences.getEditor("ExtendSelectionToEol"))
3694 self.setCaretForegroundColor( 3694 self.setCaretForegroundColor(
3695 Preferences.getEditorColour("CaretForeground")) 3695 Preferences.getEditorColour("CaretForeground"))
3696 self.setCaretLineBackgroundColor( 3696 self.setCaretLineBackgroundColor(
3697 Preferences.getEditorColour("CaretLineBackground")) 3697 Preferences.getEditorColour("CaretLineBackground"))

eric ide

mercurial