X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..609b563c8b9ade4fcde9160f11c7deaf16a9f7b6:/wxPython/wx/py/editwindow.py diff --git a/wxPython/wx/py/editwindow.py b/wxPython/wx/py/editwindow.py index cc62b12488..90aebf5953 100644 --- a/wxPython/wx/py/editwindow.py +++ b/wxPython/wx/py/editwindow.py @@ -15,30 +15,54 @@ import time import dispatcher from version import VERSION -try: - True -except NameError: - True = 1==1 - False = 1==0 - -if wx.Platform == '__WXMSW__': - FACES = { 'times' : 'Times New Roman', - 'mono' : 'Courier New', - 'helv' : 'Lucida Console', - 'lucida' : 'Lucida Console', - 'other' : 'Comic Sans MS', - 'size' : 10, - 'lnsize' : 9, - 'backcol': '#FFFFFF', + +if 'wxMSW' in wx.PlatformInfo: + FACES = { 'times' : 'Times New Roman', + 'mono' : 'Courier New', + 'helv' : 'Arial', + 'lucida' : 'Lucida Console', + 'other' : 'Comic Sans MS', + 'size' : 10, + 'lnsize' : 8, + 'backcol' : '#FFFFFF', + 'calltipbg' : '#FFFFB8', + 'calltipfg' : '#404040', + } + +elif 'wxGTK' in wx.PlatformInfo and 'gtk2' in wx.PlatformInfo: + FACES = { 'times' : 'Serif', + 'mono' : 'Monospace', + 'helv' : 'Sans', + 'other' : 'new century schoolbook', + 'size' : 10, + 'lnsize' : 9, + 'backcol' : '#FFFFFF', + 'calltipbg' : '#FFFFB8', + 'calltipfg' : '#404040', } -else: # GTK - FACES = { 'times' : 'Times', - 'mono' : 'Courier', - 'helv' : 'Helvetica', - 'other' : 'new century schoolbook', - 'size' : 12, - 'lnsize' : 10, - 'backcol': '#FFFFFF', + +elif 'wxMac' in wx.PlatformInfo: + FACES = { 'times' : 'Lucida Grande', + 'mono' : 'Courier New', + 'helv' : 'Geneva', + 'other' : 'new century schoolbook', + 'size' : 13, + 'lnsize' : 10, + 'backcol' : '#FFFFFF', + 'calltipbg' : '#FFFFB8', + 'calltipfg' : '#404040', + } + +else: # GTK1, etc. + FACES = { 'times' : 'Times', + 'mono' : 'Courier', + 'helv' : 'Helvetica', + 'other' : 'new century schoolbook', + 'size' : 12, + 'lnsize' : 10, + 'backcol' : '#FFFFFF', + 'calltipbg' : '#FFFFB8', + 'calltipfg' : '#404040', } @@ -87,11 +111,13 @@ class EditWindow(stc.StyledTextCtrl): self.autoCompleteIncludeDouble = True self.autoCompleteCaseInsensitive = True self.AutoCompSetIgnoreCase(self.autoCompleteCaseInsensitive) - self.AutoCompSetAutoHide(False) + self.autoCompleteAutoHide = False + self.AutoCompSetAutoHide(self.autoCompleteAutoHide) self.AutoCompStops(' .,;:([)]}\'"\\<>%^&+-=*/|`') # Do we want to automatically pop up command argument help? self.autoCallTip = True - self.CallTipSetBackground(wx.Colour(255, 255, 232)) + self.CallTipSetBackground(FACES['calltipbg']) + self.CallTipSetForeground(FACES['calltipfg']) self.SetWrapMode(False) try: self.SetEndAtLastLine(False)