Skip to content

Commit

Permalink
Fixed server window widget focus and display (issue #255).
Browse files Browse the repository at this point in the history
  • Loading branch information
belangeo committed Feb 15, 2023
1 parent 4bd158f commit 6517dfd
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions pyo/lib/_wxwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,11 @@ def __init__(self, parent=None, obj=None, map_list=None):
self._maps = {}
self._sigs = {}

panel = BasePanel(self)
if sys.platform == "darwin":
panel = wx.Panel(self, style=wx.TAB_TRAVERSAL)
panel.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
else:
panel = BasePanel(self)
mainBox = wx.BoxSizer(wx.VERTICAL)
self.box = wx.FlexGridSizer(len(self._map_list), 2, 5, 5)

Expand Down Expand Up @@ -1134,7 +1138,11 @@ def __init__(self, parent, samples=None, tableclass=None, object=None):
self.tableclass = tableclass
self.object = object
self.Bind(wx.EVT_CLOSE, self._destroy)
self.panel = BasePanel(self)
if sys.platform == "darwin":
self.panel = wx.Panel(self, style=wx.TAB_TRAVERSAL)
self.panel.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
else:
self.panel = BasePanel(self)
self.box = wx.BoxSizer(wx.VERTICAL)
self.wavePanel = ViewTablePanel(self.panel, object)
self.box.Add(self.wavePanel, 1, wx.EXPAND | wx.ALL, 5)
Expand Down Expand Up @@ -1198,7 +1206,11 @@ def __init__(self, parent, obj=None, tableclass=None, mouse_callback=None):
self.obj = obj
self.chnls = len(self.obj)
self.dur = self.obj.getDur(False)
self.panel = BasePanel(self)
if sys.platform == "darwin":
self.panel = wx.Panel(self, style=wx.TAB_TRAVERSAL)
self.panel.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
else:
self.panel = BasePanel(self)
self.box = wx.BoxSizer(wx.VERTICAL)
self.wavePanel = SndViewTablePanel(self.panel, obj, mouse_callback)
self.box.Add(self.wavePanel, 1, wx.EXPAND | wx.ALL, 5)
Expand Down Expand Up @@ -1536,7 +1548,11 @@ def __init__(self, parent, obj=None):
self.SetMenuBar(self.menubar)
self.Bind(wx.EVT_CLOSE, self._destroy)
self.obj = obj
self.panel = BasePanel(self)
if sys.platform == "darwin":
self.panel = wx.Panel(self, style=wx.TAB_TRAVERSAL)
self.panel.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
else:
self.panel = BasePanel(self)
self.mainBox = wx.BoxSizer(wx.VERTICAL)
self.toolBox = wx.BoxSizer(wx.HORIZONTAL)
if sys.platform == "darwin":
Expand Down Expand Up @@ -1955,7 +1971,11 @@ def __init__(self, parent, obj=None):
self.obj = obj
gain = self.obj.gain
length = self.obj.length
self.panel = BasePanel(self)
if sys.platform == "darwin":
self.panel = wx.Panel(self, style=wx.TAB_TRAVERSAL)
self.panel.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
else:
self.panel = BasePanel(self)
self.mainBox = wx.BoxSizer(wx.VERTICAL)
self.toolBox = wx.BoxSizer(wx.HORIZONTAL)
if sys.platform == "darwin":
Expand Down Expand Up @@ -3992,7 +4012,12 @@ def __init__(
self._history = []
self._histo_count = 0

panel = BasePanel(self)
if sys.platform == "darwin":
panel = wx.Panel(self, style=wx.TAB_TRAVERSAL)
panel.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
else:
panel = BasePanel(self)

box = wx.BoxSizer(wx.VERTICAL)

buttonBox = wx.BoxSizer(wx.HORIZONTAL)
Expand Down

0 comments on commit 6517dfd

Please sign in to comment.