From 9947026898283af4de46760a2cd94aab51768feb Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Sun, 22 Aug 2010 01:37:20 +0200 Subject: [PATCH] Slight fix on niki's code (wrong parents) --- gui/shipBrowser.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index fca8af181..ba9036497 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -220,10 +220,6 @@ class ShipMenu(wx.Panel): self.parent = parent sizer = wx.BoxSizer(wx.HORIZONTAL) self.SetSizer(sizer) - - p = wx.Panel(self) - psizer = wx.BoxSizer(wx.HORIZONTAL) - p.SetSizer(psizer) size = None for name, art in (("new", wx.ART_NEW), ("rename", bitmapLoader.getBitmap("rename", "icons")), ("copy", wx.ART_COPY), ("delete", wx.ART_DELETE)): @@ -231,6 +227,7 @@ class ShipMenu(wx.Panel): btn = wx.BitmapButton(self, wx.ID_ANY, bitmap) if size is None: size = btn.GetSize() + btn.SetMinSize(size) btn.SetMaxSize(size) @@ -238,11 +235,15 @@ class ShipMenu(wx.Panel): setattr(self, name, btn) btn.Enable(False) btn.SetToolTipString("%s fit." % name.capitalize()) - psizer.Add(btn, 0, wx.EXPAND) + sizer.Add(btn, 0, wx.EXPAND) - self.search = wx.SearchCtrl(parent, wx.ID_ANY, style=wx.TE_PROCESS_ENTER) + p = wx.Panel(self) + psizer = wx.BoxSizer(wx.HORIZONTAL) + p.SetSizer(psizer) + + self.search = wx.SearchCtrl(p, wx.ID_ANY, style=wx.TE_PROCESS_ENTER) self.search.ShowCancelButton(True) psizer.Add(self.search, 1, wx.EXPAND | wx.TOP, 2) p.SetMinSize((wx.SIZE_AUTO_WIDTH, 27)) sizer.Add(p, 1, wx.EXPAND) - +