1. Nicolae Dascalu
  2. rope


Ali Gholami Rudi  committed 599ed1f

Better font selection for non-unix platforms

  • Participants
  • Parent commits 3939c66
  • Branches trunk

Comments (0)

Files changed (2)

File docs/workingon.txt

View file
-- Not proposing builtins and keywords when starting is empty
-- Should we have both function and method?
-- Setting better font for status bar
-- Not auto completing only the words after dot
 ? Sorting the proposals
 ? Completions are context dependant
     ? Should editing tools access Editor directly? Which of them?
     ? Specifing the type of each story; UI or Core
 ? The connection between ASTs, module hierarchies and type databases
-* Better font selection on windows
 ? Key selection for new module and package

File rope/editor.py

View file
+import os
 from Tkinter import *
 from tkFont import *
 from ScrolledText import ScrolledText
 class GraphicalEditor(TextEditor):
     def __init__(self, parent):
-        self.text = ScrolledText(parent, bg='white', 
-                         font=Font(family='Typewriter', size=14), 
+        font = None
+        if os.name == 'posix':
+            font = Font(family='Typewriter', size=14)
+        else:
+            font = Font(family='Courier', size=13)
+        self.text = ScrolledText(parent, bg='white',
+                         font=font,
                          undo=True, maxundo=20, highlightcolor='#99A')
         self.searcher = rope.searching.Searcher(self)