Skip to content

Commit 0b4e534

Browse files
committed
Fixed 'change editor font'
1 parent 9b5212a commit 0b4e534

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

easy_abc.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -3821,10 +3821,10 @@ def __init__(self, parent, ID, app_dir, settings, options):
38213821
if wx.Platform == "__WXMSW__":
38223822
exeName = win32api.GetModuleFileName(win32api.GetModuleHandle(None))
38233823
# 1.3.8.1 [mist13] Icon for Python version in Windows
3824-
if "easy_abc" in exeName:
3824+
if "easy_abc" in exeName:
38253825
icon = wx.Icon(exeName + ";0", wx.BITMAP_TYPE_ICO)
38263826
else:
3827-
icon = wx.Icon(os.path.join('img', 'logo.ico'))
3827+
icon = wx.Icon(os.path.join(application_path, 'img', 'logo.ico'))
38283828
self.SetIcon(icon)
38293829
global execmessages, visible_abc_code
38303830
self.settings = settings
@@ -6341,7 +6341,7 @@ def OnChangeFont(self, evt):
63416341
if font and font.IsOk():
63426342
f = font
63436343
self.settings['font'] = (f.GetPointSize(), f.GetFamily(), f.GetStyle(), f.GetWeight(), f.GetUnderlined(), f.GetFaceName())
6344-
self.OnSettingsChanged()
6344+
self.InitEditor(f.GetFaceName(), f.GetPointSize())
63456345

63466346
def OnViewFieldReference(self, evt):
63476347
if not self.field_reference_frame:
@@ -7746,10 +7746,10 @@ def InitEditor(self, font_face=None, font_size=None):
77467746
font = wantFonts.pop(0)
77477747
if font in font_names:
77487748
break
7749-
self.editor.SetFont(wx.Font(size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, faceName=font))
77507749
else:
77517750
font = font_face
77527751
size = font_size
7752+
self.editor.SetFont(wx.Font(size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, faceName=font))
77537753

77547754
self.editor.SetProperty("fold", "0")
77557755
self.editor.StyleSetSpec(self.styler.STYLE_DEFAULT, "fore:#000000,face:%s,size:%d" % (font, size))

0 commit comments

Comments
 (0)