QScintilla/QsciScintillaCompat.py

changeset 2564
3eb07bb2afd4
parent 2537
0ff250733d45
child 2587
68cc83a68883
--- a/QScintilla/QsciScintillaCompat.py	Fri Apr 05 17:50:32 2013 +0200
+++ b/QScintilla/QsciScintillaCompat.py	Sat Apr 06 16:38:56 2013 +0200
@@ -111,10 +111,14 @@
         weight = -font.weight()
         italic = font.italic()
         underline = font.underline()
+        bold = font.bold()
         for style in rangeLow + rangeHigh:
             self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, style, f)
             self.SendScintilla(QsciScintilla.SCI_STYLESETSIZE, style, ps)
-            self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight)
+            try:
+                self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight)
+            except AttributeError:
+                self.SendScintilla(QsciScintilla.SCI_STYLESETBOLD, style, bold)
             self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic)
             self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline)
     

eric ide

mercurial