diff options
author | Dominique Louis <savagesoftware@gmail.com> | 2018-09-12 02:46:45 +0300 |
---|---|---|
committer | Dominique Louis <savagesoftware@gmail.com> | 2018-09-12 02:46:45 +0300 |
commit | 66ef135ac03f03a412660472c6d1fc146a7b0580 (patch) | |
tree | 154c6d0ac54d3e83732b1799891d5afb3ed10611 /Xamarin.PropertyEditing.Mac/Controls | |
parent | 0f6fb7434a3d8bd596174395192a59ec9c1b2e31 (diff) |
[Mac] Up-Down buttons will no longer allow interaction when disabled.
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/Custom/UnfocusableButton.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/UnfocusableButton.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/UnfocusableButton.cs index 0b672a1..371087d 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/UnfocusableButton.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/UnfocusableButton.cs @@ -33,7 +33,8 @@ namespace Xamarin.PropertyEditing.Mac public override void MouseDown (NSEvent theEvent) { - switch (theEvent.Type) { + if (Enabled) { + switch (theEvent.Type) { case NSEventType.LeftMouseDown: NotifyMouseLeftDown (); break; @@ -41,17 +42,22 @@ namespace Xamarin.PropertyEditing.Mac case NSEventType.RightMouseDown: NotifyMouseRightDown (); break; + } } } public override void MouseEntered (NSEvent theEvent) { - NotifyMouseEntered (); + if (Enabled) { + NotifyMouseEntered (); + } } public override void MouseExited (NSEvent theEvent) { - NotifyMouseExited (); + if (Enabled) { + NotifyMouseExited (); + } } public override void UpdateTrackingAreas () |