[GRASS-SVN] r67973 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 28 20:32:31 PST 2016


Author: wenzeslaus
Date: 2016-02-28 20:32:31 -0800 (Sun, 28 Feb 2016)
New Revision: 67973

Modified:
   grass/trunk/gui/wxpython/gui_core/pystc.py
Log:
wxGUI: use monospaced font the python editor (pyedit and gmodeler)

Modified: grass/trunk/gui/wxpython/gui_core/pystc.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/pystc.py	2016-02-29 04:25:16 UTC (rev 67972)
+++ grass/trunk/gui/wxpython/gui_core/pystc.py	2016-02-29 04:32:31 UTC (rev 67973)
@@ -35,11 +35,18 @@
         self.statusbar = statusbar
         
         self.modified = False # content modified ?
-        
-        self.faces = { 'times': 'Times New Roman',
-                       'mono' : 'Courier New',
-                       'helv' : 'Arial',
-                       'other': 'Comic Sans MS',
+
+        # this is supposed to get monospace
+        font = wx.Font(9, wx.FONTFAMILY_MODERN, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
+        face = font.GetFaceName()
+        size = font.GetPointSize()
+
+        # setting the monospace here to not mess with the rest of the code
+        # TODO: review the whole styling
+        self.faces = { 'times': face,
+                       'mono' : face,
+                       'helv' : face,
+                       'other': face,
                        'size' : 10,
                        'size2': 8,
                        }



More information about the grass-commit mailing list