QScintilla/QsciScintillaCompat.py

branch
5_3_x
changeset 2565
515d4ce27260
parent 2539
05a2752b476c
child 2631
06f866e83d3a
equal deleted inserted replaced
2563:c8a6412d098a 2565:515d4ce27260
105 f = font.family().encode() 105 f = font.family().encode()
106 ps = font.pointSize() 106 ps = font.pointSize()
107 weight = -font.weight() 107 weight = -font.weight()
108 italic = font.italic() 108 italic = font.italic()
109 underline = font.underline() 109 underline = font.underline()
110 bold = font.bold()
110 for style in rangeLow + rangeHigh: 111 for style in rangeLow + rangeHigh:
111 self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, style, f) 112 self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, style, f)
112 self.SendScintilla(QsciScintilla.SCI_STYLESETSIZE, style, ps) 113 self.SendScintilla(QsciScintilla.SCI_STYLESETSIZE, style, ps)
113 self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight) 114 try:
115 self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight)
116 except AttributeError:
117 self.SendScintilla(QsciScintilla.SCI_STYLESETBOLD, style, bold)
114 self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic) 118 self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic)
115 self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline) 119 self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline)
116 120
117 def linesOnScreen(self): 121 def linesOnScreen(self):
118 """ 122 """

eric ide

mercurial