Browse Source

Merge pull request #12520 from florisoft/fix/ToggleSwitch_android

ToggleSwitch: fix toggle on single touch tap on the knob part
pull/12708/head
Max Katz 3 years ago
committed by GitHub
parent
commit
8698418bd6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      src/Avalonia.Controls/ToggleSwitch.cs

12
src/Avalonia.Controls/ToggleSwitch.cs

@ -243,10 +243,6 @@ namespace Avalonia.Controls
} }
UpdateKnobTransitions(); UpdateKnobTransitions();
} }
else
{
base.Toggle();
}
_isDragging = false; _isDragging = false;
@ -276,14 +272,6 @@ namespace Avalonia.Controls
} }
} }
protected override void Toggle()
{
if ((_switchKnob != null) && (!_switchKnob.IsPointerOver))
{
base.Toggle();
}
}
private void UpdateKnobPos(bool value) private void UpdateKnobPos(bool value)
{ {
if ((_switchKnob != null) && (_knobsPanel != null)) if ((_switchKnob != null) && (_knobsPanel != null))

Loading…
Cancel
Save