Fixed an issue in QsciScintillaCompat setting monospaced styles. 5_3_x

Sat, 06 Apr 2013 16:38:56 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 06 Apr 2013 16:38:56 +0200
branch
5_3_x
changeset 2565
515d4ce27260
parent 2563
c8a6412d098a
child 2566
a410f3ced3ea

Fixed an issue in QsciScintillaCompat setting monospaced styles.
(grafted from 3eb07bb2afd4b664d9fba08005b43a55ed3de6fc)

QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
diff -r c8a6412d098a -r 515d4ce27260 QScintilla/QsciScintillaCompat.py
--- a/QScintilla/QsciScintillaCompat.py	Sat Apr 06 10:14:31 2013 +0200
+++ b/QScintilla/QsciScintillaCompat.py	Sat Apr 06 16:38:56 2013 +0200
@@ -107,10 +107,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