Переглянути джерело

wxGUI: show whitespace in the python editor (pyedit and gmodeler)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67974 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 9 роки тому
батько
коміт
876b13d0d5
1 змінених файлів з 6 додано та 1 видалено
  1. 6 1
      gui/wxpython/gui_core/pystc.py

+ 6 - 1
gui/wxpython/gui_core/pystc.py

@@ -84,7 +84,12 @@ class PyStc(stc.StyledTextCtrl):
         self.Bind(stc.EVT_STC_UPDATEUI, self.OnUpdateUI)
         self.Bind(stc.EVT_STC_UPDATEUI, self.OnUpdateUI)
         self.Bind(stc.EVT_STC_MARGINCLICK, self.OnMarginClick)
         self.Bind(stc.EVT_STC_MARGINCLICK, self.OnMarginClick)
         self.Bind(wx.EVT_KEY_DOWN, self.OnKeyPressed)
         self.Bind(wx.EVT_KEY_DOWN, self.OnKeyPressed)
-        
+
+        # show whitespace
+        self.SetViewWhiteSpace(1)
+        # make the symbols very light gray to be less distracting
+        self.SetWhitespaceForeground(True, wx.Colour(200, 200, 200))
+
         # Make some styles, the lexer defines what each style is used
         # Make some styles, the lexer defines what each style is used
         # for, we just have to define what each style looks like.
         # for, we just have to define what each style looks like.
         # This set is adapted from Scintilla sample property files.
         # This set is adapted from Scintilla sample property files.