From: Youness Alaoui Date: Tue, 11 Aug 2015 17:02:54 +0000 (-0400) Subject: Fix the new version dialog title being the wrong size (same hack as the config wizard) X-Git-Tag: lulzbot-15.02.1-2.01~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=794cdb1aff10db80d73851c8b4adce86deba5c90;p=cura.git Fix the new version dialog title being the wrong size (same hack as the config wizard) Also does a layout, which hopefully fixes T177, but I can't reproduce that one, so I'm not sure if it does... --- diff --git a/Cura/gui/newVersionDialog.py b/Cura/gui/newVersionDialog.py index cc628e8a..b2b85605 100644 --- a/Cura/gui/newVersionDialog.py +++ b/Cura/gui/newVersionDialog.py @@ -5,7 +5,7 @@ from Cura.util import version class newVersionDialog(wx.Dialog): url = "code.alephobjects.com/w/cura/release-notes/" - + def __init__(self): super(newVersionDialog, self).__init__(None, title="Welcome to the new version!") @@ -19,8 +19,13 @@ class newVersionDialog(wx.Dialog): s = wx.BoxSizer(wx.VERTICAL) p.SetSizer(s) - title = wx.StaticText(p, -1, 'Cura - ' + version.getVersion()) - title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD)) + title_text = 'Cura - ' + version.getVersion() + title = wx.StaticText(p, -1, title_text) + font = wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD) + title.SetFont(font) + dc = wx.ScreenDC() + dc.SetFont(font) + title.SetMinSize(dc.GetTextExtent(title_text)) s.Add(title, flag=wx.ALIGN_CENTRE|wx.EXPAND|wx.BOTTOM, border=5) s.Add(wx.StaticText(p, -1, 'Welcome to the new version of Cura.')) s.Add(wx.StaticText(p, -1, '(This dialog is only shown once)')) @@ -35,6 +40,7 @@ class newVersionDialog(wx.Dialog): self.Fit() self.Centre() + self.Layout() def OnOk(self, e): self.Close()