Browse Source

Fix implicit float to int conversion raising DeprecationWarning

1.0.5-release-candidate
Johan Pauwels 4 years ago
committed by Chris
parent
commit
ac2cd91793
1 changed files with 2 additions and 2 deletions
  1. 4
      gooey/gui/util/wx_util.py

4
gooey/gui/util/wx_util.py

@ -51,7 +51,7 @@ def withColor(statictext, hex):
def h0(parent, label): def h0(parent, label):
text = wx.StaticText(parent, label=label) text = wx.StaticText(parent, label=label)
font_size = text.GetFont().GetPointSize() font_size = text.GetFont().GetPointSize()
font = wx.Font(font_size * 1.4, *styles['h0'])
font = wx.Font(int(font_size * 1.4, *styles['h0']))
text.SetFont(font) text.SetFont(font)
return text return text
@ -67,7 +67,7 @@ def h2(parent, label):
def _header(parent, label, styles): def _header(parent, label, styles):
text = wx.StaticText(parent, label=label) text = wx.StaticText(parent, label=label)
font_size = text.GetFont().GetPointSize() font_size = text.GetFont().GetPointSize()
font = wx.Font(font_size * 1.2, *styles)
font = wx.Font(int(font_size * 1.2), *styles)
text.SetFont(font) text.SetFont(font)
return text return text

Loading…
Cancel
Save