mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-05 16:20:38 +08:00
On mouse-enter, change on/off icon to on, on mouse-out, change on/off icon to previous state
This commit is contained in:
parent
9b31b8f6b3
commit
eb0aac458b
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user