Extended the editor monospaced style to allow to set the weight, italic and underline properties. 5_3_x

Sat, 09 Mar 2013 17:05:49 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 09 Mar 2013 17:05:49 +0100
branch
5_3_x
changeset 2473
c9f484ea061b
parent 2471
36eb585339fc
child 2475
c74e1cff7f3f

Extended the editor monospaced style to allow to set the weight, italic and underline properties.
(grafted from 4860fe0ed4a64fc4e367a5903a78d68ec19317fe)

QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
--- a/QScintilla/QsciScintillaCompat.py	Sat Mar 09 15:43:46 2013 +0100
+++ b/QScintilla/QsciScintillaCompat.py	Sat Mar 09 17:05:49 2013 +0100
@@ -104,9 +104,15 @@
         
         f = font.family().encode()
         ps = font.pointSize()
+        weight = -font.weight()
+        italic = font.italic()
+        underline = font.underline()
         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);
+            self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic);
+            self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline);
     
     def linesOnScreen(self):
         """

eric ide

mercurial