From: Ferdi van der Werf Date: Wed, 18 Apr 2012 18:28:53 +0000 (+0200) Subject: On mouse-enter, change on/off icon to on, on mouse-out, change on/off icon to previou... X-Git-Tag: RC3~18^2~10 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=eb0aac458bd920b2cd11e3109d9b585a5b0b5052;p=cura.git On mouse-enter, change on/off icon to on, on mouse-out, change on/off icon to previous state --- diff --git a/Cura/gui/toolbarUtil.py b/Cura/gui/toolbarUtil.py index 06cd72cc..eba0a0b0 100644 --- a/Cura/gui/toolbarUtil.py +++ b/Cura/gui/toolbarUtil.py @@ -101,10 +101,14 @@ class ToggleButton(buttons.GenBitmapToggleButton): def OnMouseEnter(self, event): self.GetParent().OnPopupDisplay(event) + self.SetBitmap(True) + self.Refresh() event.Skip() def OnMouseLeave(self, event): self.GetParent().OnPopupHide(event) + self.SetBitmap(self.GetValue()) + self.Refresh() event.Skip() class RadioButton(buttons.GenBitmapButton): @@ -159,10 +163,14 @@ class RadioButton(buttons.GenBitmapButton): def OnMouseEnter(self, event): self.GetParent().OnPopupDisplay(event) + self.SetBitmap(True) + self.Refresh() event.Skip() def OnMouseLeave(self, event): self.GetParent().OnPopupHide(event) + self.SetBitmap(self.GetValue()) + self.Refresh() event.Skip() class NormalButton(buttons.GenBitmapButton):