Kl4rry / simp

🖼️ Simp is a fast and simple GPU-accelerated image manipulation program.
Apache License 2.0
307 stars 14 forks source link

Zoom speed is too fast/sensitive on MacBook trackpad #21

Closed DannyJJK closed 1 year ago

DannyJJK commented 2 years ago

Simp 3.2.0 OS: macOS Ventura 13.0.1 (22A400) Hardware: MacBook Pro 13-inch, 2019

When using the two-finger scroll gesture on the MacBook trackpad, the image zoom is over-sensitive/too fast. This is a problem I've seen on other cross-platform applications, so this issue is not unique to Simp.

I originally thought this issue was due to line-based scrolling instead of pixel based because it feels like line-based scrolling, however looking at simp/app.rs it looks like it should handle pixel-based scrolling.

WindowEvent::MouseWheel { delta, .. } => {
    if !self.metadata_visible {
        let scroll = match delta {
            MouseScrollDelta::LineDelta(_, y) => *y,
            MouseScrollDelta::PixelDelta(pos) => pos.y as f32,
        };

        self.zoom(scroll, self.mouse_position);
    }
}

So I'm not sure what's causing this issue, maybe it's macOS specific.

Kl4rry commented 2 years ago

I cannot test this but MacOS might only send LineDelta events.

Kl4rry commented 1 year ago

@DannyJJK https://github.com/Kl4rry/simp/commit/4e19b41cbc9bead63f4e9e18eeec25ea3e49165d adds some simple preferences that allows the zoom speed to be adjusted. Does this fix the issue? You can try it out using one of the builds from github actions.