Open CodeDevAM opened 3 months ago
This is because Fluent theme shrinks the Button
while pressed and Button
requires the pointer to be within its bounds upon release for a click event to occur.
The easiest way is to replace the shrinking behavior below via styling:
See https://github.com/AvaloniaUI/Avalonia/discussions/16100 for details.
Thanks for the advise.
However I would consider this as an unexpected behaviour. In my opinion the click logic of a button should work on the original size of the button when the mouse is pressed down. Because otherwise the UI do feel unresposive when you hit the button at the wrong place.
Probably a duplicate of https://github.com/AvaloniaUI/Avalonia/issues/7626
Describe the bug
When a button has a big horizontal extend it has a relatively large area on the left and on the right where a click does not get accepted.
On mouse down the button shrinks and it seems to only accept clicks on mouse release on the shrinked button size.
https://github.com/AvaloniaUI/Avalonia/assets/125025268/2a3736bd-50f0-4d7b-ba9c-06e87c4905fb
To Reproduce
Should be reproducable with any large button but may depend on the theme and the styling.
Expected behavior
A button is accept clicks on its entire size
Avalonia version
11.1.0
OS
Windows
Additional context
No response