Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scroll modifier options #815

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

imkunet
Copy link

@imkunet imkunet commented Jun 17, 2024

Problem statement

On Apple laptops, using the trackpad in Tracy scrolls far more than it does in other applications. To remedy this, scroll modifier options have been added.

Pitfalls

  • Somewhat weird easing behavior
  • Frame overview vertical scrolling is still unchanged due to difficulty of implementing a multiplier for the whole values

@wolfpld
Copy link
Owner

wolfpld commented Jun 17, 2024

This may be a good feature to have, but I'm not sure it's the right solution for the problem at hand. How will this setting affect users who want to use both touchpad and mouse? It seems to me that the correct solution is to somehow process the Apple touchpad values to be more in line with what is available with other hardware configurations.

See ocornut/imgui#6096 and ocornut/imgui#4019 for possibly related discussion.

@imkunet
Copy link
Author

imkunet commented Jun 17, 2024

Absolutely agreed, it is a patchwork solution especially considering that resolving the behavioral differences between trackpad and mouse wheel would solve the frame overview zooming because that relies on the behavior of the mouse wheel having individual "notches".

From what I was able to glean from the referenced issues, this is a non-trivial issue on the part of ImGui and seems to require whole new systems just to handle touch-like events to be built in order to better handle this.

Perhaps emulation of individual wheel notches with some ratio of a delta wheel to individual click is the way to go? That of course raising questions of distinguishing between trackpad and mouse on the scroll events which doesn't appear to exist given the linked issue's discussion1.

Footnotes

  1. https://github.com/ocornut/imgui/issues/6103#issuecomment-1398851694

@wolfpld
Copy link
Owner

wolfpld commented Jun 18, 2024

Perhaps emulation of individual wheel notches with some ratio of a delta wheel to individual click is the way to go?

I don't think this is a good solution. Ideally, the amount of touchpad zoom should be related to the amount of finger movement. Currently, it doesn't. It's too sensitive to fine movements, and the response to fast movements feels sluggish.

I don't remember the exact details of what the code is doing and why. The zoom was implemented with mouse wheel notches in mind, and the touchpad zoom was fine tuned later to make it somewhat usable. It should use a separate code path with no easing and direct mapping of input values to zoom changes, but that requires knowledge of which input device is being used.

Mentioning @ocornut, as the discussion is relevant to him.

@ocornut
Copy link

ocornut commented Jun 18, 2024

I am going to be mostly away this week. Interested in what you find.

The io.AddXXXX API can now be used to distinguish touchpad vs mouse so this be useful if you need to specialize something here.

I am not well versed in Mac so there may be something else, eg a high-level zoom event?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants