Browse Source

fix pr nits

pull/2001/head
Andrey Kunchev 7 years ago
parent
commit
922917b299
  1. 1
      src/Avalonia.Controls/Button.cs
  2. 6
      tests/Avalonia.Controls.UnitTests/ButtonTests.cs

1
src/Avalonia.Controls/Button.cs

@ -251,7 +251,6 @@ namespace Avalonia.Controls
IsPressed = false;
e.Handled = true;
//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))))
{

6
tests/Avalonia.Controls.UnitTests/ButtonTests.cs

@ -96,7 +96,7 @@ namespace Avalonia.Controls.UnitTests
}
[Fact]
public void Button_Is_Raising_Click()
public void Button_Raises_Click()
{
var mouse = Mock.Of<IMouseDevice>();
IInputElement captured = null;
@ -124,7 +124,7 @@ namespace Avalonia.Controls.UnitTests
}
[Fact]
public void Button_Is_Not_Raising_Click_When_PointerReleased_Outside()
public void Button_Does_Not_Raise_Click_When_PointerReleased_Outside()
{
var mouse = Mock.Of<IMouseDevice>();
IInputElement captured = null;
@ -153,7 +153,7 @@ namespace Avalonia.Controls.UnitTests
}
[Fact]
public void Button_With_RenderTransform_Is_Raising_Click()
public void Button_With_RenderTransform_Raises_Click()
{
var mouse = Mock.Of<IMouseDevice>();
IInputElement captured = null;

Loading…
Cancel
Save