diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 0290876..dd6893d 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -134,7 +134,7 @@ class Controller(object): self.status_setter.start() self.set_online() self.create_unread_messages() - + self.window.realize() def in_post(self, buffer): buffer = self.search(buffer) buffer.get_items() diff --git a/src/wxUI/mainWindow.py b/src/wxUI/mainWindow.py index 21d4913..fc92e8f 100644 --- a/src/wxUI/mainWindow.py +++ b/src/wxUI/mainWindow.py @@ -31,11 +31,14 @@ class mainWindow(wx.Frame): self.sizer = wx.BoxSizer(wx.VERTICAL) self.sb = self.CreateStatusBar() self.tb = wx.Treebook(self.panel, -1) - self.sizer.Add(self.tb, 0, wx.ALL, 5) + self.sizer.Add(self.tb, 1, wx.ALL|wx.EXPAND, 5) def realize(self): self.panel.SetSizer(self.sizer) self.SetClientSize(self.sizer.CalcMin()) + self.Layout() + self.SetSize(self.GetBestSize()) + print self.GetSize() def change_status(self, status): self.sb.SetStatusText(status) diff --git a/src/wxUI/tabs/home.py b/src/wxUI/tabs/home.py index 08df84a..a4b09dc 100644 --- a/src/wxUI/tabs/home.py +++ b/src/wxUI/tabs/home.py @@ -8,9 +8,9 @@ class homeTab(wx.Panel): def create_list(self): self.lbl = wx.StaticText(self, wx.NewId(), _(u"Po&sts")) self.list = widgetUtils.list(self, *[_(u"User"), _(u"Text"), _(u"Date")], style=wx.LC_REPORT) - self.list.set_windows_size(0, 80) - self.list.set_windows_size(1, 190) - self.list.set_windows_size(2, 40) + self.list.set_windows_size(0, 200) + self.list.set_windows_size(1, 300) + self.list.set_windows_size(2, 250) self.list.set_size() self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown) @@ -26,8 +26,9 @@ class homeTab(wx.Panel): sizer.Add(self.postBox, 0, wx.ALL, 5) self.create_list() sizer.Add(self.lbl, 0, wx.ALL, 5) - sizer.Add(self.list.list, 0, wx.ALL, 5) + sizer.Add(self.list.list, 0, wx.EXPAND, 5) self.SetSizer(sizer) + self.SetClientSize(sizer.CalcMin()) def OnKeyDown(self, ev=None): pub.sendMessage("show-current-status", buffer=self.name)