Change size of implant editor to fit some quite long hardwiring names (like em-8 series)

This commit is contained in:
DarkPhoenix
2019-04-18 16:38:57 +03:00
parent 4269a00428
commit 0471ffa924
2 changed files with 5 additions and 20 deletions

View File

@@ -37,13 +37,6 @@ class BaseImplantEditorView(wx.Panel):
availableSizer.Add(self.searchBox, 0, wx.EXPAND)
availableSizer.Add(self.itemView, 1, wx.EXPAND)
'''
self.availableImplantsSearch = wx.SearchCtrl(self, wx.ID_ANY, style=wx.TE_PROCESS_ENTER)
self.availableImplantsSearch.ShowCancelButton(True)
availableSizer.Add(self.availableImplantsSearch, 0, wx.BOTTOM | wx.EXPAND, 2)
'''
self.availableImplantsTree = wx.TreeCtrl(self, wx.ID_ANY, style=wx.TR_DEFAULT_STYLE | wx.TR_HIDE_ROOT)
root = self.availableRoot = self.availableImplantsTree.AddRoot("Available")
self.availableImplantsImageList = wx.ImageList(16, 16)
@@ -202,7 +195,6 @@ class BaseImplantEditorView(wx.Panel):
class AvailableImplantsView(d.Display):
DEFAULT_COLS = ["attr:implantness",
"Base Icon",
"Base Name"]
def __init__(self, parent):
@@ -212,9 +204,7 @@ class AvailableImplantsView(d.Display):
class ItemView(d.Display):
DEFAULT_COLS = ["Base Icon",
"Base Name",
"attr:power,,,True",
"attr:cpu,,,True"]
"Base Name"]
def __init__(self, parent):
d.Display.__init__(self, parent)

View File

@@ -114,7 +114,10 @@ class ImplantSetEditor(BaseImplantEditorView):
class ImplantSetEditorDlg(wx.Dialog):
def __init__(self, parent):
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title="Implant Set Editor", size=wx.Size(640, 600))
wx.Dialog.__init__(
self, parent, id=wx.ID_ANY,
title="Implant Set Editor",
size=wx.Size(900, 500) if "wxGTK" in wx.PlatformInfo else wx.Size(850, 420))
self.block = False
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
@@ -139,11 +142,6 @@ class ImplantSetEditorDlg(wx.Dialog):
self.stNotice.Wrap(-1)
footerSizer.Add(self.stNotice, 1, wx.BOTTOM | wx.TOP | wx.LEFT, 5)
if "wxGTK" in wx.PlatformInfo:
self.closeBtn = wx.Button(self, wx.ID_ANY, "Close", wx.DefaultPosition, wx.DefaultSize, 0)
mainSizer.Add(self.closeBtn, 0, wx.ALL | wx.ALIGN_RIGHT, 5)
self.closeBtn.Bind(wx.EVT_BUTTON, self.closeEvent)
importExport = (("Import", wx.ART_FILE_OPEN, "from"),
("Export", wx.ART_FILE_SAVE_AS, "to"))
@@ -182,9 +180,6 @@ class ImplantSetEditorDlg(wx.Dialog):
self.Destroy()
return
def closeEvent(self, event):
self.Destroy()
def __del__(self):
pass