IDE: Fix use of deprecated wx.NamedColour wxPython4
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Fri, 04 Nov 2022 22:09:42 +0100
branchwxPython4
changeset 3658 5ba5a0177fb3
parent 3657 e0d6f5f0dcc2
child 3659 278dc1144059
IDE: Fix use of deprecated wx.NamedColour
controls/LogViewer.py
--- a/controls/LogViewer.py	Fri Nov 04 17:38:37 2022 +0100
+++ b/controls/LogViewer.py	Fri Nov 04 22:09:42 2022 +0100
@@ -144,7 +144,7 @@
 
         width, height = self.GetClientSize()
 
-        gc.SetPen(wx.Pen(wx.NamedColour("GREY"), 3))
+        gc.SetPen(wx.Pen(wx.Colour("GREY"), 3))
         gc.SetBrush(wx.GREY_BRUSH)
 
         gc.DrawLines(ArrowPoints(wx.TOP, width * 0.75, width * 0.5, 2, (width + height) // 4 - 3))
@@ -161,7 +161,7 @@
         if self.Parent.IsMessagePanelBottom():
             exclusion_rect.height = height - width - exclusion_rect.y
         if exclusion_rect != thumb_rect:
-            colour = wx.NamedColour("LIGHT GREY")
+            colour = wx.Colour("LIGHT GREY")
             gc.SetPen(wx.Pen(colour))
             gc.SetBrush(wx.Brush(colour))
 
@@ -215,7 +215,7 @@
 
     def Draw(self, dc):
         dc.SetPen(wx.TRANSPARENT_PEN)
-        dc.SetBrush(wx.Brush(wx.NamedColour("LIGHT GREY")))
+        dc.SetBrush(wx.Brush(wx.Colour("LIGHT GREY")))
 
         dc.DrawRectangle(self.Position.x, self.Position.y,
                          self.Size.width, self.Size.height)