From ac2cd91793ed11c16d0e22312065472583ec4063 Mon Sep 17 00:00:00 2001 From: Johan Pauwels Date: Fri, 11 Sep 2020 23:44:59 +0100 Subject: [PATCH] Fix implicit float to int conversion raising DeprecationWarning --- gooey/gui/util/wx_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gooey/gui/util/wx_util.py b/gooey/gui/util/wx_util.py index 1f2f6fc..6d12217 100644 --- a/gooey/gui/util/wx_util.py +++ b/gooey/gui/util/wx_util.py @@ -51,7 +51,7 @@ def withColor(statictext, hex): def h0(parent, label): text = wx.StaticText(parent, label=label) 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) return text @@ -67,7 +67,7 @@ def h2(parent, label): def _header(parent, label, styles): text = wx.StaticText(parent, label=label) 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) return text