Replies: 4 comments
-
I don't think I have ever used a UI framework that works like this. Is this a common thing? Anyway, I feel like you could solve this by just making bigger buttons?
This could be useful, but right now it would be hard to implement. Avalonia's style system needs more work for full responsive design. EG Anyway, Avalonia does already have a way to tell what the current pointer type is. Avalonia/src/Avalonia.Base/Input/IPointer.cs Lines 55 to 70 in 7087595 Avalonia/src/Avalonia.Base/Input/PointerEventArgs.cs Lines 51 to 54 in 7087595 However in most cases people don't care what caused the event. It also sounds like you are using code behind? If you are using MVVM you typically use |
Beta Was this translation helpful? Give feedback.
-
I think the idea here is an application which supports multiple interaction devices simultaneously, and controls behave differently depending on which one is currently interacting with them. So a button is the normal size for the mouse, but has an enlarged hit region which is only applied when That specific issue isn't actually related to pointer events, but to the hit testing which occurs before the event is raised. As far as I can see the hit testing system only uses a raw |
Beta Was this translation helpful? Give feedback.
-
I would say so, it would basically require rearranging the entire UI to avoid hit boxes overlapping each other, and at that point you may as well just use a larger button. |
Beta Was this translation helpful? Give feedback.
-
As mentioned above, we went with Pointer*** APIs providing a single common API for any pointer-like input event. Ensuring developers don't need to write more code for each new input app needs to support. And even more importantly - supporting these input types without developer needing to care about them for common cases.
You can do that. From pointer arguments you can get input information and pointer type (mouse, pen or touch). |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
Hi, I found this framework use pointers (mouse , touch , pen) as same thing
Event source
and I didn't like this approach because when you designed UI will need adapted to diff inputs.Example 1 : touch input may involve 2 button one of them is fake button and larger size than the not-fake button( act as hit box ) so you can press it more easy once the click made by touch.
Example 2: you may make the app change the app once detected a pen input for less keyboard shortcut.
so this why it's better to have more than Generic pointers that apply to all, you make it auto if the user didnt sub to special input event.
Describe the solution you'd like
add
Pen-Pointers
,touch-pressed
Describe alternatives you've considered
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions