belangeo / pyo

Python DSP module
GNU Lesser General Public License v3.0
1.31k stars 131 forks source link

Minor bug: In Pyo Server window (wxPython v4.2) if Interpreter input has focus and then clicking on buttons #255

Closed Bibiko closed 1 year ago

Bibiko commented 1 year ago

In Pyo Server window (wxPython v4.2) if Interpreter input has focus and then clicking on any buttons (Start, Stop, ...) the buttons' state and label are overlapped. If Interpreter input looses the focus the buttons are redrawn correctly. I'm on macOS 13.1 (arm).

Bibiko commented 1 year ago

This can be fixed in _wxwidgets.py > class ServerGUI(wx.Frame) (at least for macOS).

Instead of initialising panel by panel = BasePanel(self)

do it the default way panel = wx.Panel(self, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TAB_TRAVERSAL)

without setting back/foregroundcolours since with wx 4.2 it's done automatically (at least on macOS).

The issue is, I think, if BackGroundStyle is set to CUSTOM one has to bind wx.EVT_PAINT to a function which draws the panel's background.

belangeo commented 1 year ago

Fix is in git.