Make scrolling-by-selection smoother

This trivial patch makes scrolling-by-selection smoother by dividing
the step size and the time between steps by 8 when generating
synthetic events in work area.

The scrolling speed is unchanged, but the result is visually better.
This commit is contained in:
Jean-Marc Lasgouttes 2024-07-20 19:47:32 +02:00
parent 216a6fb348
commit 1cc1f0ba27

View File

@ -943,6 +943,8 @@ void GuiWorkArea::generateSyntheticMouseEvent()
step = 80000 / (time * time);
time = 40;
}
step /= 8;
time /= 8;
}
d->synthetic_mouse_event_.timeout.setTimeout(time);
d->synthetic_mouse_event_.timeout.start();