Configtool: resize the window properly.

This means, including the background panel and background picture.
This commit is contained in:
Markus Hitter 2015-05-29 23:03:32 +02:00
parent be16c98e59
commit 95d7f0fa1e
1 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,7 @@ class ConfigFrame(wx.Frame):
def __init__(self): def __init__(self):
wx.Frame.__init__(self, None, -1, "Teacup Configtool", size = (880, 550)) wx.Frame.__init__(self, None, -1, "Teacup Configtool", size = (880, 550))
self.Bind(wx.EVT_CLOSE, self.onClose) self.Bind(wx.EVT_CLOSE, self.onClose)
self.Bind(wx.EVT_SIZE, self.onResize)
self.deco = Decoration() self.deco = Decoration()
@ -81,6 +82,7 @@ class ConfigFrame(wx.Frame):
self.nb.AddPage(self.pgBoard, self.boardBaseText) self.nb.AddPage(self.pgBoard, self.boardBaseText)
panel.Fit() panel.Fit()
self.panel = panel
sz.Add(self.nb, 1, wx.EXPAND + wx.ALL, 5) sz.Add(self.nb, 1, wx.EXPAND + wx.ALL, 5)
self.SetSizer(sz) self.SetSizer(sz)
@ -95,6 +97,11 @@ class ConfigFrame(wx.Frame):
self.Destroy() self.Destroy()
def onResize(self, evt):
self.panel.SetSize(self.GetClientSize())
self.Refresh()
evt.Skip();
def setPrinterTabFile(self, fn): def setPrinterTabFile(self, fn):
self.printerFileName = fn self.printerFileName = fn
self.updatePrinterTab() self.updatePrinterTab()