Better font selection and sizes for wxGTK2, tweaked call tip colors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -16,24 +16,41 @@ import dispatcher
 | 
				
			|||||||
from version import VERSION
 | 
					from version import VERSION
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if wx.Platform == '__WXMSW__':
 | 
					if 'wxMSW' in wx.PlatformInfo:
 | 
				
			||||||
    FACES = { 'times'  : 'Times New Roman',
 | 
					    FACES = { 'times'     : 'Times New Roman',
 | 
				
			||||||
              'mono'   : 'Courier New',
 | 
					              'mono'      : 'Courier New',
 | 
				
			||||||
              'helv'   : 'Lucida Console',
 | 
					              'helv'      : 'Lucida Console',
 | 
				
			||||||
              'lucida' : 'Lucida Console',
 | 
					              'lucida'    : 'Lucida Console',
 | 
				
			||||||
              'other'  : 'Comic Sans MS',
 | 
					              'other'     : 'Comic Sans MS',
 | 
				
			||||||
              'size'   : 10,
 | 
					              'size'      : 10,
 | 
				
			||||||
              'lnsize' : 9,
 | 
					              'lnsize'    : 9,
 | 
				
			||||||
              'backcol': '#FFFFFF',
 | 
					              'backcol'   : '#FFFFFF',
 | 
				
			||||||
 | 
					              'calltipbg' : '#FFFFB8',
 | 
				
			||||||
 | 
					              'calltipfg' : '#404040',
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
else:  # GTK
 | 
					
 | 
				
			||||||
    FACES = { 'times'  : 'Times',
 | 
					elif 'wxGTK' in wx.PlatformInfo and 'gtk2' in wx.PlatformInfo:
 | 
				
			||||||
              'mono'   : 'Courier',
 | 
					    FACES = { 'times'     : 'Serif',
 | 
				
			||||||
              'helv'   : 'Helvetica',
 | 
					              'mono'      : 'Monospace',
 | 
				
			||||||
              'other'  : 'new century schoolbook',
 | 
					              'helv'      : 'Sans',
 | 
				
			||||||
              'size'   : 12,
 | 
					              'other'     : 'new century schoolbook',
 | 
				
			||||||
              'lnsize' : 10,
 | 
					              'size'      : 10,
 | 
				
			||||||
              'backcol': '#FFFFFF',
 | 
					              'lnsize'    : 9,
 | 
				
			||||||
 | 
					              'backcol'   : '#FFFFFF',
 | 
				
			||||||
 | 
					              'calltipbg' : '#FFFFB8',
 | 
				
			||||||
 | 
					              'calltipfg' : '#404040',
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					else: # GTK1, OSX, etc.
 | 
				
			||||||
 | 
					    FACES = { 'times'     : 'Times',
 | 
				
			||||||
 | 
					              'mono'      : 'Courier',
 | 
				
			||||||
 | 
					              'helv'      : 'Helvetica',
 | 
				
			||||||
 | 
					              'other'     : 'new century schoolbook',
 | 
				
			||||||
 | 
					              'size'      : 12,
 | 
				
			||||||
 | 
					              'lnsize'    : 10,
 | 
				
			||||||
 | 
					              'backcol'   : '#FFFFFF',
 | 
				
			||||||
 | 
					              'calltipbg' : '#FFFFB8',
 | 
				
			||||||
 | 
					              'calltipfg' : '#404040',
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -87,7 +104,8 @@ class EditWindow(stc.StyledTextCtrl):
 | 
				
			|||||||
        self.AutoCompStops(' .,;:([)]}\'"\\<>%^&+-=*/|`')
 | 
					        self.AutoCompStops(' .,;:([)]}\'"\\<>%^&+-=*/|`')
 | 
				
			||||||
        # Do we want to automatically pop up command argument help?
 | 
					        # Do we want to automatically pop up command argument help?
 | 
				
			||||||
        self.autoCallTip = True
 | 
					        self.autoCallTip = True
 | 
				
			||||||
        self.CallTipSetBackground(wx.Colour(255, 255, 232))
 | 
					        self.CallTipSetBackground(FACES['calltipbg'])
 | 
				
			||||||
 | 
					        self.CallTipSetForeground(FACES['calltipfg'])
 | 
				
			||||||
        self.SetWrapMode(False)
 | 
					        self.SetWrapMode(False)
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            self.SetEndAtLastLine(False)
 | 
					            self.SetEndAtLastLine(False)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user