Commit 47ff877d authored by Guillaume Seguin's avatar Guillaume Seguin

Check if widget is Enabled or not in xyz buttons drawing

This is required to get correct drawing in Locked mode
parent 0779be49
......@@ -240,7 +240,7 @@ class XYButtons(BufferedCanvas):
w, h = (self.bg_bmp.GetWidth(), self.bg_bmp.GetHeight())
gc.DrawBitmap(self.bg_bmp, 0, 0, w, h)
if self.enabled:
if self.enabled and self.IsEnabled():
# Brush and pen for grey overlay when mouse hovers over
gc.SetPen(wx.Pen(wx.Colour(100, 100, 100, 172), 4))
gc.SetBrush(wx.Brush(wx.Colour(0, 0, 0, 128)))
......@@ -473,7 +473,7 @@ class XYButtonsMini(XYButtons):
w, h = (self.bg_bmp.GetWidth(), self.bg_bmp.GetHeight())
gc.DrawBitmap(self.bg_bmp, 0, 0, w, h)
if self.enabled:
if self.enabled and self.IsEnabled():
# Brush and pen for grey overlay when mouse hovers over
gc.SetPen(wx.Pen(wx.Colour(100, 100, 100, 172), 4))
gc.SetBrush(wx.Brush(wx.Colour(0, 0, 0, 128)))
......
......@@ -105,7 +105,7 @@ class ZButtons(BufferedCanvas):
w, h = (self.bg_bmp.GetWidth(), self.bg_bmp.GetHeight())
gc.DrawBitmap(self.bg_bmp, 0, 0, w, h)
if self.enabled:
if self.enabled and self.IsEnabled():
# Draw label overlays
gc.SetPen(wx.Pen(wx.Colour(255, 255, 255, 128), 1))
gc.SetBrush(wx.Brush(wx.Colour(255, 255, 255, 128 + 64)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment