Skip to content

Commit

Permalink
Merge pull request psychopy#646 from hsogo/master
Browse files Browse the repository at this point in the history
ENH: unify fonts in non-code boxes in Builder components dialog (Win32)
  • Loading branch information
peircej committed Aug 10, 2014
2 parents 91b74f3 + dec0b83 commit 9a66db6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion psychopy/app/_psychopyApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,17 @@ def onInit(self, showSplash=True, testMode=False):
self.dpi = int(wx.GetDisplaySize()[0]/float(wx.GetDisplaySizeMM()[0])*25.4)
if not (50<self.dpi<120): self.dpi=80#dpi was unreasonable, make one up

self._mainFont = wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT)
if sys.platform=='win32': #wx.SYS_DEFAULT_GUI_FONT is default GUI font in Win32
self._mainFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
else:
self._mainFont = wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT)
if hasattr(self._mainFont, 'Larger'):
# Font.Larger is available since wyPython version 2.9.1
# PsychoPy still supports 2.8 (see ensureMinimal above)
self._mainFont = self._mainFont.Larger()
self._codeFont = wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FIXED_FONT)
self._codeFont.SetFaceName(self.prefs.coder['codeFont'])
self._codeFont.SetPointSize(self._mainFont.GetPointSize()) #unify font size

#create both frame for coder/builder as necess
if splash:
Expand Down

0 comments on commit 9a66db6

Please sign in to comment.