Skip to content

Commit

Permalink
wxGUI: Fix Location Wizard titles being cut off. (#1774)
Browse files Browse the repository at this point in the history
* Fix wizard titles from being cut off.
* Black formatting
* Set vertical size of title text based on font pixel height
* New line between self.page and font

Co-authored-by: Huidae Cho <grass4u@gmail.com>
  • Loading branch information
ocsmit and HuidaeCho committed Mar 31, 2022
1 parent b87fece commit d44cf8e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gui/wxpython/location_wizard/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,18 @@ class TitledPage(WizardPageSimple):
def __init__(self, parent, title):
self.page = WizardPageSimple.__init__(self, parent)

font = wx.Font(13, wx.SWISS, wx.NORMAL, wx.BOLD)
font_height = font.GetPixelSize()[1]

# page title
self.title = StaticText(
parent=self, id=wx.ID_ANY, label=title, style=wx.ALIGN_CENTRE_HORIZONTAL
parent=self,
id=wx.ID_ANY,
label=title,
style=wx.ALIGN_CENTRE_HORIZONTAL,
size=(-1, font_height),
)
self.title.SetFont(wx.Font(13, wx.SWISS, wx.NORMAL, wx.BOLD))
self.title.SetFont(font)
# main sizers
self.pagesizer = wx.BoxSizer(wx.VERTICAL)

Expand Down

0 comments on commit d44cf8e

Please sign in to comment.