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

fix smooth scrolling on macOS #7904

Merged
merged 2 commits into from
Jan 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/gui/gtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,13 @@ gboolean dt_gui_get_scroll_unit_deltas(const GdkEventScroll *event, int *delta_x
// accumulate trackpad/touch scrolls until they make a unit
// scroll, and only then tell caller that there is a scroll to
// handle
#ifdef GDK_WINDOWING_QUARTZ // on macOS deltas need to be scaled
acc_x += event->delta_x / 50;
acc_y += event->delta_y / 50;
#else
acc_x += event->delta_x;
acc_y += event->delta_y;
#endif
const gdouble amt_x = trunc(acc_x);
const gdouble amt_y = trunc(acc_y);
if(amt_x != 0 || amt_y != 0)
Expand Down