# HG changeset patch # User Edouard Tisserant # Date 1657570880 -7200 # Node ID cb7db021280c5278106dcac4d87046904c06df18 # Parent 7f62da4362fd979eb09859aff3286cfad2b7c795 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. diff -r 7f62da4362fd -r cb7db021280c dialogs/ConnectionDialog.py --- 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 diff -r 7f62da4362fd -r cb7db021280c graphics/FBD_Objects.py --- 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)