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!")
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)'))
self.Fit()
self.Centre()
+ self.Layout()
def OnOk(self, e):
self.Close()