Centralize font handling

closes #1098

Co-authored-by: Jazzzny <jazzzny225@gmail.com>
This commit is contained in:
Dhinak G
2023-09-18 12:05:21 -04:00
parent 211e8fbb71
commit 9676c2c08a
14 changed files with 134 additions and 111 deletions
+3 -3
View File
@@ -30,12 +30,12 @@ class AboutFrame(wx.Frame):
# Set title
title = wx.StaticText(frame, label="OpenCore Legacy Patcher", pos=(-1, 5))
title.SetFont(wx.Font(19, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False, ".AppleSystemUIFont"))
title.SetFont(gui_support.font_factory(19, wx.FONTWEIGHT_BOLD))
title.Centre(wx.HORIZONTAL)
# Set version
version = wx.StaticText(frame, label=f"Version: {self.constants.patcher_version}", pos=(-1, title.GetPosition()[1] + title.GetSize()[1] + 5))
version.SetFont(wx.Font(11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, ".AppleSystemUIFont"))
version.SetFont(gui_support.font_factory(11, wx.FONTWEIGHT_NORMAL))
version.Centre(wx.HORIZONTAL)
# Description
@@ -47,7 +47,7 @@ class AboutFrame(wx.Frame):
spacer = 5
for line in description:
desc = wx.StaticText(frame, label=line, pos=(-1, version.GetPosition()[1] + version.GetSize()[1] + 5 + spacer))
desc.SetFont(wx.Font(13, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, ".AppleSystemUIFont"))
desc.SetFont(gui_support.font_factory(13, wx.FONTWEIGHT_NORMAL))
desc.Centre(wx.HORIZONTAL)
spacer += 20