Browse Source

fix for issue #2000 button with rendertransform don't fire click

pull/2001/head
Andrey Kunchev 8 years ago
parent
commit
e1874b4a4c
  1. 4
      src/Avalonia.Controls/Button.cs

4
src/Avalonia.Controls/Button.cs

@ -251,7 +251,9 @@ namespace Avalonia.Controls
IsPressed = false;
e.Handled = true;
if (ClickMode == ClickMode.Release && new Rect(Bounds.Size).Contains(e.GetPosition(this)))
//only renderer (hittesting) know better whether pointer is over the bounds of the button
if (ClickMode == ClickMode.Release &&
(IsPointerOver || new Rect(Bounds.Size).Contains(e.GetPosition(this))))
{
OnClick();
}

Loading…
Cancel
Save