QScintilla/QsciScintillaCompat.py

changeset 2564
3eb07bb2afd4
parent 2537
0ff250733d45
child 2587
68cc83a68883
equal deleted inserted replaced
2560:cb82017d4dac 2564:3eb07bb2afd4
109 f = font.family().encode() 109 f = font.family().encode()
110 ps = font.pointSize() 110 ps = font.pointSize()
111 weight = -font.weight() 111 weight = -font.weight()
112 italic = font.italic() 112 italic = font.italic()
113 underline = font.underline() 113 underline = font.underline()
114 bold = font.bold()
114 for style in rangeLow + rangeHigh: 115 for style in rangeLow + rangeHigh:
115 self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, style, f) 116 self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, style, f)
116 self.SendScintilla(QsciScintilla.SCI_STYLESETSIZE, style, ps) 117 self.SendScintilla(QsciScintilla.SCI_STYLESETSIZE, style, ps)
117 self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight) 118 try:
119 self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight)
120 except AttributeError:
121 self.SendScintilla(QsciScintilla.SCI_STYLESETBOLD, style, bold)
118 self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic) 122 self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic)
119 self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline) 123 self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline)
120 124
121 def linesOnScreen(self): 125 def linesOnScreen(self):
122 """ 126 """

eric ide

mercurial