wxPython4 sequels: fix exception in connection dialog, force black text in FBD.
- wxPython4 does not have RemoveSizer in API anymore.
- On GTK3 with dark theme default text colour is white, making it unreadable.
--- a/dialogs/ConnectionDialog.py Thu Jul 07 21:41:35 2022 +0200
+++ b/dialogs/ConnectionDialog.py Mon Jul 11 22:21:20 2022 +0200
@@ -93,7 +93,7 @@
self.MainSizer.Add(
self.ButtonSizer, border=20,
flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
- self.ColumnSizer.RemoveSizer(self.RightGridSizer)
+ self.ColumnSizer.Remove(self.RightGridSizer)
# Add button for applying connection name modification to all connection
# of POU
--- a/graphics/FBD_Objects.py Thu Jul 07 21:41:35 2022 +0200
+++ b/graphics/FBD_Objects.py Mon Jul 11 22:21:20 2022 +0200
@@ -771,6 +771,7 @@
Graphic_Element.Draw(self, dc)
dc.SetPen(MiterPen(wx.BLACK))
dc.SetBrush(wx.WHITE_BRUSH)
+ dc.SetTextForeground(wx.BLACK)
if getattr(dc, "printing", False):
name_size = dc.GetTextExtent(self.Name)
@@ -1011,6 +1012,7 @@
Graphic_Element.Draw(self, dc)
dc.SetPen(MiterPen(wx.BLACK))
dc.SetBrush(wx.WHITE_BRUSH)
+ dc.SetTextForeground(wx.BLACK)
if getattr(dc, "printing", False):
name_size = dc.GetTextExtent(self.Name)