Open turbo opened 9 months ago
Hi @turbo ! Thanks for download and test NAppGUI.
Yes it's true. Horizontal mouse scrolling is disabled, not only for macOS, also for Windows/Linux. When I was developing View support I was bothered by the horizontal micro-scrolls produced by the MagicMouse. It's easy to solve. I will upload it to GitHub shortly.
Thanks! Yes, I think macOS is sufficiently different to warrant a change. The behaviour I'm used to from other macOS apps is that once you start to scroll in a particular direction, it will lock into that direction. But if you start with a diagonal gesture, it'll move more freely. That means there are usually no micro-scrolls happening once you start to scroll horizontally. That might be unique to macOS, but probably also applies to modern Windows laptops with Windows Precision Touchpad drivers.
Its a good tip. Set the scroll type based on first gesture. Perhaps I'll also add some user configuration for special kind of views.
enum mouse_motion_t
{
ekMOUSE_FIXED_HORIZONTAL,
ekMOUSE_FIXED_VERTICAL,
ekMOUSE_FREE,
ekMOUSE_BY_GESTURE (default)
};
view_mouse_config(View *view, mouse_motion_t motion);
That's a great idea. The option to have "free" is useful for some views (e.g. a map), and the default makes sense.
Using macOS Sonoma (Apple Silicon), in none of the demos that have a horizontally scrolling container (e.g. the table demo in GuiHello) work with touchpad scrolling. I can scroll vertically, I can even scroll horizontally when the cursor hovers the bottom scrollbar, but if the cursor is in the view, only vertical scrolling functions.
Here's a demo showing what I mean. I try to do three things:
https://github.com/frang75/nappgui_src/assets/8023543/367bcabb-2d3c-498c-a159-84f548926de4