Fixed an unwanted behavior of collapsible pane (it shows by default a pane - fix:sized to 0x0) affecting statspane view; Added Widget Inspection Tool in menu - should help debugging UI stuff if needed
This commit is contained in:
@@ -105,7 +105,8 @@ class MainFrame(wx.Frame):
|
||||
def registerMenu(self):
|
||||
# Quit
|
||||
self.Bind(wx.EVT_MENU, self.ExitApp, id=wx.ID_EXIT)
|
||||
|
||||
# Widgets Inspector
|
||||
self.Bind(wx.EVT_MENU, self.openWXInspectTool, id=911)
|
||||
# About
|
||||
self.Bind(wx.EVT_MENU, self.ShowAboutBox, id=wx.ID_ABOUT)
|
||||
|
||||
@@ -116,3 +117,15 @@ class MainFrame(wx.Frame):
|
||||
def toggleShipBrowser(self, event):
|
||||
self.GetToolBar().toggleShipBrowser(event)
|
||||
|
||||
def openWXInspectTool(self,event):
|
||||
from wx.lib.inspection import InspectionTool
|
||||
if not InspectionTool().initialized:
|
||||
InspectionTool().Init()
|
||||
|
||||
# Find a widget to be selected in the tree. Use either the
|
||||
# one under the cursor, if any, or this frame.
|
||||
wnd = wx.FindWindowAtPointer()
|
||||
if not wnd:
|
||||
wnd = self
|
||||
InspectionTool().Show(wnd, True)
|
||||
|
||||
|
||||
@@ -58,3 +58,4 @@ class MainMenuBar(wx.MenuBar):
|
||||
self.Append(helpMenu, "&Help")
|
||||
helpMenu.Append(wx.ID_ABOUT)
|
||||
helpMenu.Append(wx.ID_HELP, "User manual", "User manual")
|
||||
helpMenu.Append(911,"Open Widgets Inspect tool", "Open Widgets Inspect tool")
|
||||
|
||||
@@ -232,6 +232,11 @@ class StatsPane(wx.Panel):
|
||||
self.SetSizer(self.pickerSizer)
|
||||
|
||||
collapsible = wx.CollapsiblePane(self, label="Stats")
|
||||
|
||||
colPane=collapsible.GetPane()
|
||||
colPane.SetMinSize(wx.Size(0,0))
|
||||
colPane.SetSize(wx.Size(0,0))
|
||||
|
||||
collapsible.Expand()
|
||||
collapsible.Bind(wx.EVT_COLLAPSIBLEPANE_CHANGED, self.collapseChanged)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user