eric7/E5Gui/E5GenericDiffHighlighter.py

branch
eric7
changeset 8318
962bce857696
parent 8312
800c432b34c8
equal deleted inserted replaced
8316:0c7a44af84bc 8318:962bce857696
7 Module implementing a syntax highlighter for diff outputs. 7 Module implementing a syntax highlighter for diff outputs.
8 """ 8 """
9 9
10 import re 10 import re
11 11
12 from PyQt5.QtGui import QSyntaxHighlighter, QTextCharFormat, QFont 12 from PyQt6.QtGui import QSyntaxHighlighter, QTextCharFormat, QFont
13 13
14 import Preferences 14 import Preferences
15 15
16 16
17 def TERMINAL(pattern): 17 def TERMINAL(pattern):
100 @param bold flag indicating bold text (boolean) 100 @param bold flag indicating bold text (boolean)
101 @return format definiton (QTextCharFormat) 101 @return format definiton (QTextCharFormat)
102 """ 102 """
103 font = Preferences.getEditorOtherFonts("MonospacedFont") 103 font = Preferences.getEditorOtherFonts("MonospacedFont")
104 charFormat = QTextCharFormat() 104 charFormat = QTextCharFormat()
105 charFormat.setFontFamily(font.family()) 105 charFormat.setFontFamilies([font.family()])
106 charFormat.setFontPointSize(font.pointSize()) 106 charFormat.setFontPointSize(font.pointSize())
107 107
108 if fg: 108 if fg:
109 charFormat.setForeground(fg) 109 charFormat.setForeground(fg)
110 110

eric ide

mercurial