Force all buttons to the same size
This commit is contained in:
@@ -182,10 +182,7 @@ class ShipMenu(wx.Panel):
|
|||||||
for name, art in (("new", wx.ART_NEW), ("rename", bitmapLoader.getBitmap("rename", "icons")), ("copy", wx.ART_COPY), ("delete", wx.ART_DELETE)):
|
for name, art in (("new", wx.ART_NEW), ("rename", bitmapLoader.getBitmap("rename", "icons")), ("copy", wx.ART_COPY), ("delete", wx.ART_DELETE)):
|
||||||
bitmap = wx.ArtProvider.GetBitmap(art, wx.ART_BUTTON) if name != "rename" else art
|
bitmap = wx.ArtProvider.GetBitmap(art, wx.ART_BUTTON) if name != "rename" else art
|
||||||
btn = wx.BitmapButton(self, wx.ID_ANY, bitmap)
|
btn = wx.BitmapButton(self, wx.ID_ANY, bitmap)
|
||||||
if size is None:
|
btn.SetSize((30, 26))
|
||||||
size = btn.GetSize()
|
|
||||||
else:
|
|
||||||
btn.SetSize(size)
|
|
||||||
|
|
||||||
setattr(self, name, btn)
|
setattr(self, name, btn)
|
||||||
btn.Enable(False)
|
btn.Enable(False)
|
||||||
|
|||||||
Reference in New Issue
Block a user